home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!data.nas.nasa.gov!taligent!apple!stevec
- From: stevec@Apple.COM (Steve Christensen)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: InitDialogs [Q]
- Message-ID: <71422@apple.Apple.COM>
- Date: 20 Aug 92 05:21:42 GMT
- References: <9208040003.AA02657@ucbvax.Berkeley.EDU>
- Organization: Apple Computer Inc., Cupertino, CA
- Lines: 37
-
- robert_hess@macweek.ziff.com ("Robert Hess") writes:
- >InitDialogs [Q]
- >This is probably a dumb question or an FAQ...
-
- >What's wrong with calling InitDialogs from within an INIT? I've tried passing
- >in (0), (nil), ((ProcPtr) nil)...but I always crash at boot with an address
- >error (which isn't even recoverable from MacsBug...I can't even RS or RB, damn
- >it).
-
- >What am I doing wrong?
-
- >Thanks,
- >Robert
-
- Well, you can't arbitrarily call InitDialogs without first setting up -all-
- of the other managers that it relies upon. Typically you need to call the
- following routines first:
-
- InitGraf (QuickDraw)
- InitFonts (Font Manager)
- InitWindows (Window Manager)
- TEInit (TextEdit)
-
- and -then-
-
- InitDialogs (Dialog Manager)
-
- Of course you need to allocate some local space for QuickDraw's A5 globals,
- which will be used while your INIT is running, but other than that, it's
- pretty straightforward...
-
- steve
-
- --
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Steve Christensen Never hit a man with glasses.
- stevec@apple.com Hit him with a baseball bat.
-