Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!mailrus!uwmcsd1!ig!agate!violet.berkeley.edu!edmoy From: edmoy@violet.berkeley.edu Newsgroups: comp.sys.mac.programmer Subject: Re: Dialogs in INITS (LSC3) Message-ID: <13946@agate.BERKELEY.EDU> Date: 6 Sep 88 17:11:40 GMT References: <1325UD040164@NDSUVM1> Sender: usenet@agate.BERKELEY.EDU Organization: University of California, Berkeley Lines: 34 In article <1325UD040164@NDSUVM1> UD040164@NDSUVM1.BITNET (a.d. jensen) writes: >Here is a problem which has me stumped: > >I wrote an INIT in LSC3 which basically throws up a dialog box and >then messes around with it, then discards it. Basically, I call >GetNewDialog (with NULL for the storage), use SetIText and SetCTitle >to monkey around with the dialog as needed, then call ModalDialog to >handle it, then call DisposDialog to get rid of it. All is well, until >the DisposDialog, when I get a system bomb 2. > >The trouble I have with this is that _nothing_ bad happens until I try >to do something with the window (ie: DisposDialog, MoveWindow, etc). >This seems very weird. > >All of my experimentation has been for nought. No matter where I try >to do something with the window, it always crashes. BTW, this _does_ >work fine on the Mac II. Somewhere I read that INITs are "not supposed" to do window and dialog stuff. But even Apple does it in AppleShare, when on bootup it may ask for a password. One thing I do notice is that when the INIT in AppleShare runs, the screen (with the Welcome to Macintosh message) blanks out. I wonder if AppleShare is calling InitWindows(). Perhaps on the Mac II, InitWindows() is called in a different order than on other Macs. If it is called before INITs, then all would be fine. Edward Moy Principal Programmer - Macintosh & Unix Workstation Support Services Workstation Software Support Group University of California Berkeley, CA 94720 edmoy@violet.Berkeley.EDU ucbvax!violet!edmoy