Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!xanth!mcnc!ecsvax!dlugose From: dlugose@ecsvax.UUCP (Dan Dlugose) Newsgroups: comp.sys.mac.hypercard Subject: Re: Problem with pathnames Message-ID: <7354@ecsvax.UUCP> Date: 19 Jul 89 16:59:49 GMT References: <281@opus.NMSU.EDU> Reply-To: dlugose@ecsvax.uncecs.edu.UUCP (Dan Dlugose) Organization: UNC Educational Computing Service Lines: 52 In article <281@opus.NMSU.EDU> lrasmuss@dante.nmsu.edu (Linda Rasmussen) writes: > > >Can anyone help me with an (apparently)Fsimple problem concerning >pathnames to external applications? I am using the commands > > open application In this case the path is taken from the home stack, card with applications But, if you update this card with paths, I think you have to quit and restart HyperCard. Also, with a syntax error on the path, that entry is ignored. > open "document" with application > open "adisk:afile:aaplication" This case is more foolproof in the short run, but see caveats above. But, if you ever move applications around in the directory structure, you may have many buttons that don't work, so I usually avoid pathnames except in my Home stack cards "Look for ... in" Also remember if a disk goes offline, e.g. Appletalk server or other external disk, HyperCard will ask "Where is..." instead of something like "No disk HD40: online" > >in button scripts, and HC seems unable to remember or use pathnames, >either from the Home Stack cards, or from the scripts I provide. Hence, >each time I reopen HC and use the buttons I have to tell it where the >applications are. It *usually* remembers during a single session. Make sure you don't have two "Home" stacks. > >Another (related?) problem that came up at the same time is that >my HC application keeps reverting to User Level 2 (typing) after I quit, I would run a stack reporter to get all the scripts in your stack and the Home stack. At some level there is a handler that sets the userlevel to 2. Start by looking for an "On closeStack " handler in the stack script (or background script) of your stack, followed by looking for such a handler in your home stack. But there are other places it could be. A stack can have scripts you did not consciously create, e.g. do a new stack while at the Home stack with "copy background" active. Also don't assume you already know what's in the script of your Home stack. Other stacks modify it. >despite the fact that both User Preferences and stack protection are >set at Scripting. When I go to User Prefs from the Home Card to reset >the level to Scripting, the Scripting bullet is still highlighted >but it immediately bounces up to Typing. Then it resets without a problem-- The hilite of this button gets corrected when the card opens. So if you set it to 5 on this card, go to another stack and come back, if the closestack handler sets userlevel to 2, the userlevel really is two, but when you look at this card, you'll see the button change from 5 to 2. >until I quit HC. I "solved" this problem without really solving it-- >by inserting a "set userLevel to 5" command in the Home stack script; Dan Dlugose UNC Educational Computing Service