Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!munnari.oz.au!goanna!minyos.xx.rmit.oz.au!s902113 From: s902113@minyos.xx.rmit.oz.au (Luke Mewburn) Newsgroups: comp.sys.mac.programmer Subject: Menubar setup Summary: Can't set up a menubar Keywords: notworking Message-ID: <1991Jun1.071031.5882@minyos.xx.rmit.oz.au> Date: 1 Jun 91 07:10:31 GMT Distribution: comp Organization: RMIT Computer Centre, Melbourne Australia. Lines: 33 I'm using a bit of code in THINK C 4.0.5 to try and set up a menu bar. I am initialising all the right stuff, and I can get a couple of windows displayed. BUT, when the menu initialisation code is run, I get a system error. I got the debugger out, and stepping thru, it stopped on line 'x' (in the listing below), and said "odd address". I know what this means, but I want to know why... BTW: I have set up the correct resource info for MBAR and MENU types. The code seg follows: void MenuBarInit() { Handle myMenuBar; myMenuBar=GetNewMBar(BASE_RES_ID); /* 'line x' */ SetMenuBar(myMenuBar); gAppleMenu=GetMHandle(APPLE_MENU_ID); gFileMenu=GetMHandle(FILE_MENU_ID); gEditMenu=GetMHandle(EDIT_MENU_ID); DrawMenuBar(); } BASE_RES_ID is set to 1000, the# of the MBAR resource. The rsrc is set up correctly as well... Any ideas?????? -- ____________________________________________________________________________ | | | | Luke Mewburn (Zak) | This side for lease... | | s902113@minyos.xx.rmit.oz.au | (No disclaimer, can't afford it:-) |