danny@utkux1.utk.edu ("Danny W. McCampbell") (05/15/91)
I am write a chunk of code that simple draws the Menu Bar for my program, but when I run it from within Think Pascal 3.02 I get a bus error at the designated line: procedure Menus; begin {Menus} ClearMenuBar; {Clear old Menu Bar} vBPMBAR := GetNewMBar(BPMBAR); {Get the MBAR for BP} SetMenuBar(vBPMBAR); {Set BP's MBAR as current Menu Bar} DisposHandle(vBPMBAR); {Release handle from Memory} vAppleMenu := GetMHandle(AppleMenu); {Get the handle for the Apple Menu} AddResMenu(vAppleMenu, 'DRVR'); {Add the Desk Accessories} DrawMenuBar; {Draw the Menu Bar now}-----------Bus Error right here! end; {Menus} I have an SE/30 with 8 megs of Ram running 7.0b4. Please help me out. Thanks Danny McCampbell Computer Operator/Systems Analyst University of Tennessee (Knoxville) 2339 Dunford Hall Knoxville, TN 37916 Phone: (615) 974-0138
siegel@world.std.com (Rich Siegel) (05/15/91)
In article <1991May14.180045.483@cs.utk.edu> danny@utkux1.utk.edu ("Danny W. McCampbell") writes: >I am write a chunk of code that simple draws the Menu Bar for my program, >but when I run it from within Think Pascal 3.02 I get a bus error at the >designated line: > > procedure Menus; > begin {Menus} > ClearMenuBar; {Clear old Menu Bar} > vBPMBAR := GetNewMBar(BPMBAR); {Get the MBAR for BP} > SetMenuBar(vBPMBAR); {Set BP's MBAR as current Menu Bar} > DisposHandle(vBPMBAR); {Release handle from Memory} > vAppleMenu := GetMHandle(AppleMenu); {Get the handle for the Apple Menu} > AddResMenu(vAppleMenu, 'DRVR'); {Add the Desk Accessories} > DrawMenuBar; {Draw the Menu Bar now}-----------Bus Error right >here! > end; {Menus} > Don't DisposeHandle the menu bar you're about to draw with, and it should work correctly. (This is neither a Pascal 3.0.2 nor a System 7.0b4 problem, as far as I can tell.) >I have an SE/30 with 8 megs of Ram running 7.0b4. > >Please help me out. Thanks > >Danny McCampbell >Computer Operator/Systems Analyst >University of Tennessee (Knoxville) >2339 Dunford Hall >Knoxville, TN 37916 >Phone: (615) 974-0138 R. -- ----------------------------------------------------------------------- Rich Siegel Internet: siegel@world.std.com Software Engineer Applelink: SIEGEL Symantec Languages Group
rhart@anaconda.cis.ohio-state.edu (ronald thomas hart) (05/21/91)
Outbursts of emotion are neccessary. Newsgroups: comp.sys.mac.programmer Subject: HyperCard Help! Summary: Flashing Hilite in a scolling field Expires: References: <6050@ns-mx.uiowa.edu> Sender: Followup-To: Distribution: Organization: The Ohio State University, Department of Computer and Information Science Keywords: I'm having trouble with a scolling field in HyperCard. When a selection is hilited, then chosen, an event occurs (i.e. showing a card field). When the event occurs the selection gets "deselected" and is no longer hilited. This makes for a very ugly implementation. I have tried using SelectLineXCMD but to no avail. Does anybody have a possible workaround for this problem. I posted in the HyperCard section but the newsgroup is no longer available. Thanks, Ron
zune@lysator.liu.se (Andreas Magnusson) (05/24/91)
Well, this is starting to get serious. I upgraded the compiler to 3.0.2 and tried to compile my project. It crashes at the same place as 3.0.1 crashes. Rather annoying! What happens is this: I call SFGetFile with OK parameters. The compiler complains. When I start to remove debug support it ends up in uRuntime.lib with "Illegal Instruction"! Have anybody encountered this problem? I'm running in a vanilla (almost) SE with 2 diskdrives and 2.5 Mb memory. /Andreas -- | Andreas Magnusson || Vet ni varf|r datavetare {r s} | | Linkoping Institute of Technology || smarta? Jo, de LISTAR ut allt! | | c89andma@odalix.ida.liu.se || Karin Willborg, C89 LiTH | | zune@nanny.lysator.liu.se ||(This is in Swedish, it's a bad joke)|
smargari@nmsu.edu (Susan Margarit) (05/27/91)
Well, I hate to ask the obvious, but I have had experiences in the past where the managers were not initialized and sometimes GetFile/PutFile worked and sometimes it crashed spectacularly. So, have you invoked the magic incantation that initializes the various managers? (ie. InitGraf,InitFonts etc.) Jim.