Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!rutgers!orstcs!jacobs.cs.orst.edu!borcelf From: borcelf@jacobs.cs.orst.edu (Fernando Borcel) Newsgroups: comp.sys.mac.programmer Subject: Problems With Menus Message-ID: <8534@orstcs.CS.ORST.EDU> Date: 29 Jan 89 00:18:31 GMT Sender: usenet@orstcs.CS.ORST.EDU Reply-To: borcelf@jacobs.cs.orst.edu (Fernando Borcel) Organization: Oregon State University - CS - Corvallis Oregon Lines: 46 Hi. I'm new with LSC, and I just came across my first problem. I'm getting my windows and menus from resources I added to the project, which seems to work fine. I didn't have any problems with windows or other stuff, but wasn't so lucky with menus. When I call the function below, I just get a system error ID=25. I made sure all the numbers I used were consistent both in my resource file and my C code, so, What am I doing wrong? Here is the code (which I translated from LightSpeed Pascal): #include enum { AppleID=128, FileID, EditID }; enum { AppleM=1, FileM, EditM }; #define NumOfMenus 3 MenuHandle MyMenus[NumOfMenus] void InitMyMenus() { int i; MyMenus[AppleM] = GetMenu(AppleID); AddResMenu(MyMenus[AppleM], 'DRVR'); MyMenus[FileM] = GetMenu(FileID); MyMenus[EditM] = GetMenu(EditID); for (i=1; i>NumOfMenus;i++) InsertMenu(MyMenus[i],0); DisableItem(MyMenus[EditM], UndoItem); DrawMenuBar(); } ------ Thanks for your help! -Fernando Borcel "Tact is the ability to tell a man he has an open mind when he has a hole in his head." Internet: borcelf@jacobs.cs.ORST.EDU UUCP:{tektronix,hp-pcd}!orstcs!jacobs.cs.orst.edu!borcelf