Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!cornell!rochester!uhura.cc.rochester.edu!aisl From: aisl@uhura.cc.rochester.edu (Lawrence Landry) Newsgroups: comp.sys.mac.hypercard Subject: Re: Question about the startUp message Message-ID: <492@ur-cc.UUCP> Date: 14 Dec 88 16:33:42 GMT References: <406@accuvax.nwu.edu.NWU.EDU> Reply-To: aisl@uhura.cc.rochester.edu (Lawrence Landry) Organization: University of Rochester Lines: 31 In article <406@accuvax.nwu.edu.NWU.EDU> mcgee@nuacc.acns.nwu.edu (Randy McGee) writes: >The second was simply to send the startUp message to the Home stack. The >problem here is that when I do this, HyperCard goes into a loop until it stop >with a recursion limit error. After playing around for a while and putting >some debugging puts into my handler, I've determined that sending the startUp >message to the Home stack somehow ends up calling my stack handler again! >This is contrary to the normal progression of messages through the >hierarchy. > This is a hack to fix what I view as a bug, but it works. The key is to keep track of whether you have been executed yourself. Try the following script. It should work. on startUp global startup_already if startup_already is empty then put "busy" into startup_already startup put empty into startup_already set the userLevel to 3 -- other commands you need to execute else pass startUp end if end startUp Larry Landry University of Rochester