Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!uunet!pmafire!mica.inel.gov!guinness!usenet From: bcarter@claven.idbsu.edu (Bruce Carter) Newsgroups: comp.sys.mac.hypercard Subject: Re: custom menus Message-ID: <1991Jun24.154428.26787@guinness.idbsu.edu> Date: 24 Jun 91 15:44:28 GMT Article-I.D.: guinness.1991Jun24.154428.26787 References: <6445@mindlink.bc.ca> Sender: usenet@guinness.idbsu.edu (Usenet News mail) Organization: Boise State University - Courseware Development Lines: 33 Nntp-Posting-Host: brucespc In article <6445@mindlink.bc.ca> Peter_Francis@mindlink.bc.ca (Peter Francis) writes: >I have two problems. 1 is that when I open a stack directly (ie by double >clicking on the icon from the finder level) the openstack handler seems to run >twice. Which is often annoying. In two stacks I create custom menuitems in >openstack and am constantly facing the message "Menu X" already exists. So I >have to cancel before proceding. Can I test for the existence of the menu item >in the script and skip the second creation process? Similarly my addressbook >stack asks me the name of the person I am looking for and finds it. It also >does this twice if I open from outside HC. The second problem with the menus is >that on CloseStack I use the handler "reset menubar". This takes about ten >seconds (I haven't timed it but it is much longer than actually creating the >menu in the first place). Can I speed this up or is there a faster way to undo >my menu customization? > This sounds like you have a handler popping off twice when it shouldn't be. I have seen a couple of stacks with this problem, and mostly it has involved navigation ("go") commands in the openStack or first openCard scripts, or duplication between openStack and openCard. You might be able to locate something there. Check the startUp script too. As far as checking, you can say "if there is a menu "Whatever" then ..." If you are just adding menus and not modifying HC's original menus, you can just delete the menus you added. Otherwise, without doing some involved reconstruction, "reset menubar" is the quickest way. Note that there is a school of thought that disapproves of rampant menubar resets due to other customization of the menubar that may have been done. <-> Bruce Carter, Courseware Development Coordinator bcarter@claven.idbsu.edu Boise State University, Boise, ID 83725 duscarte@idbsu.bitnet (This message contains personal opinions only) (208)385-1250@phone