sanford@aria.UUCP (Curtis Sanford) (12/18/90)
I have set up a shared database using hypercard. I have a read/write master copy of the database on a shared volume, and each user keeps a local copy for read-only. They can push a button to go to the shared copy when they want to make an update, and then return to their local copy. I am trying to provide a button to allow them to copy the shared copy over their local copy to bring the local copy up to date. I have not found any way to do this with standard Hypercard. I have tried to use "HFSCopy" and "HFSRename" from "Support Tools eXternals" available in the public domain. When I do, I inconsistantly get errors such as Sorry, unexpected error #-35 Can anyone help me with any of: 1) Is there a better way to try to copy a file from HC? 2) Am I misusing HFSCopy? 3) What is this unexpected error? 4) How do I get a list of these errors and their meanings? Any help will be much appreciated. Curtis Sanford
mandel@vax.anes.tulane.edu (Jeff E Mandel MD MS) (12/29/90)
In article <343@aria.UUCP> sanford@aria.UUCP (Curtis Sanford) writes: >I have set up a shared database using hypercard. I have a read/write master >copy of the database on a shared volume, and each user keeps a local copy >for read-only. They can push a button to go to the shared copy when they >want to make an update, and then return to their local copy. I am trying >to provide a button to allow them to copy the shared copy over their local >copy to bring the local copy up to date. I have not found any way to do this >with standard Hypercard. > >I have tried to use "HFSCopy" and "HFSRename" from "Support Tools eXternals" >available in the public domain. When I do, I inconsistantly get errors such >as >Sorry, unexpected error #-35 > >Can anyone help me with any of: > 1) Is there a better way to try to copy a file from HC? > 2) Am I misusing HFSCopy? > 3) What is this unexpected error? > 4) How do I get a list of these errors and their meanings? > >Any help will be much appreciated. > >Curtis Sanford > Answers: I have not found an easy builtin way to copy a stack quickly without user intervention, i.e. doMenu "Save a copy.." without dialog does not bypass the SFPutFile. Thus, I wrote my own stak copying XCMD (called STAKcopy). To use it for your purposes, I will need to modify it to permit it to overwrite a file, but this should be relatively easy. Will look at it soon. If you are getting errors like -35 (Specied volume doesn't exist) you probably are misusing HFSCopy. Not having used it myself, I can only guess that you are not properly specifying your filename. The full list of file manager errors can be found in Inside Mac vol IV p 201. I am kind of swamped with work right now, but I am planning on updating STAKcopy RSN to provide some minimal revision control feature for HyperCard. My plan is to use the 'vers' resource (which Finder uses to tell you the file info) to generate the destination filename. Thus, if my current stack is myAwesomeStack, and its version is 1.0b1, and I do "Save a copy", the XCMD traps the "Save a copy" and offers to save the file as myAwesomeStack 1.0b1 and updates the version of the working stack to 1.0b2 (in an editable text field). Additionally, I could keep a pathname to a folder into which the backups are to be placed. If there is some enthusiasm for this as a $10 shareware program, post to me and I will try to get it done. Jeff E Mandel MD MS mandel@vax.anes.tulane.edu