Path: utzoo!mnetor!uunet!husc6!think!ames!oliveb!felix!john From: john@felix.UUCP (John Gilbert) Newsgroups: comp.sys.mac.hypercard Subject: Re: the target Message-ID: <24416@felix.UUCP> Date: 9 Mar 88 23:28:18 GMT References: <1011@pur-phy> <24353@felix.UUCP> Sender: daemon@felix.UUCP Reply-To: john@felix.UUCP (John Gilbert) Organization: FileNet Corp., Costa Mesa, CA Lines: 55 In article <24353@felix.UUCP> john@felix.UUCP I wrote: > >just properties. Anyone know if there is a reasonable way to use "the target" >in the case of a field to get the contents, other than using the "do" command >on a string I build? I have since found the 'value' function which seems to do just what is needed. Thanks anyway! Now for a more technical question. I am writing an XCMD to copy resources from one file (stack) to another, so that I can release a stack with a bunch of 'snd 's in it, and have it install them where you tell it. I know there is already one floating around, but this is mainly a learning exercise. Well, it basically works, except when the target file does not yet have a resource fork. I am looking for this, and basically do the following: if ( (target = OpenResFile( targetFile )) == -1 ) { CreateResFile( targetFile ); if ( ResError() != noErr ) { return; } else if ( target = OpenResFile( targetFile ) == -1 ) { return; } } Well, the XCMD continues to function, but near completion, or immidiately after returning to HyperCard, things go haywire. Either the screen locks up (usually), or pulling down menus to look at stack info causes HyperCard to unexpectedly quit. On occaision, my system will not reboot from my hard disk, it just keeps trying, but when it get's to the desktop it instantly returns to happy-Mac and tries again. Replacing the system file fixes it. In cases where the resource fork already exists it seems to work flawlessly time after time. Is there something I am missing about creating the resource fork of the file? I do later read the file looking for a conflicting resource name before ever putting anything in it. Tonight I am going to try being a bit smarter about that. Does this suggest anything to anyone? I have very early versions of Inside Mac. Thanks for any help.... John Gilbert -- John Gilbert !trwrb!felix!john