Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!rice!uupsi!sunic!ugle.unit.no!eik.ii.uib.no!lilje.uib.no!rose.uib.no!fnahf From: fnahf@rose.uib.no (FLESCHE, HARALD) Newsgroups: comp.sys.mac.programmer Subject: Re: Dialog within an INIT Message-ID: <1991Apr18.023727.27526@lilje.uib.no> Date: 18 Apr 91 02:28:51 GMT References: <1991Mar21.183154.22245@hubcap.clemson.edu> Sender: usenet@lilje.uib.no (Bergen Univ news account) Reply-To: pettersson@cc.uib.no Organization: University of Bergen, Norway Lines: 18 News-Software: VAX/VMS VNEWS 1.3-4 In article <1991Mar21.183154.22245@hubcap.clemson.edu>, mcmac@hubcap.clemson.edu (Scott McAlister) writes... >In an INIT that I am writing, I want to display a Dialog Box when I trap >on MountVol. I keep getting a "Bus Error" (using 6.0.7 on a IIsi). I am >using THINK C 4.02. I just wrote an init that displays a dialog upon startup, yes, I know - one of those "orwellian" inits (see tn 256). It bombed every time I referenced the dialogPtr returned by NewDialog. After trying *everything* I remembered reading an article written by the programmer of "initcdev". He gives the solution: clear the DeskHook global early in your code (i.e. DeskHook = 0L). If that doesn't work try to allocate more memory, by increasing the value of your "sysz" resource. Tor Olaussen Nansen Remote Sensing Center University of Bergen Bergen, Norway