Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!psuvax1!psuvm!dn5 From: DN5@PSUVM.BITNET Newsgroups: comp.sys.mac.programmer Subject: GetMenu danger?? Message-ID: <89353.093306DN5@PSUVM.BITNET> Date: 19 Dec 89 14:33:06 GMT Organization: Penn State University Lines: 32 Hi, I am writing a HyperCard XCMD to use popup menus from resources (I didn't like the idea of creating the data structures each and every time I invoked the thing). I pass the menu id to the XCMD, and then I do a GetMenu on the id, then go through that menu looking for submenus, and call GetMenu on them. This works (so far), and it returns the proper values. After I use the menus, I call DeleteMenu on them (also recursively) to take them out of the list of active menus. After I am finished with the menus, I make them purgeable again, then return. My problem: In Inside Mac I, it claims that GetMenu should never be called more than once for a menu. Yet I have to call GetMenu each time I invoke this XCMD; however, I do a DeleteMenu for each menu I call GetMenu for. My question: Even though this SEEMS to be working, am I creating a time bomb? Thanks, D. Jay Newman dn5@psuvm.psu.edu ps. Please use email for replies, because Thursday I am going away for a week (University Christmas).