home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 14255 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  1.5 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!data.nas.nasa.gov!taligent!apple!stevec
  2. From: stevec@Apple.COM (Steve Christensen)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: InitDialogs [Q]
  5. Message-ID: <71422@apple.Apple.COM>
  6. Date: 20 Aug 92 05:21:42 GMT
  7. References: <9208040003.AA02657@ucbvax.Berkeley.EDU>
  8. Organization: Apple Computer Inc., Cupertino, CA
  9. Lines: 37
  10.  
  11. robert_hess@macweek.ziff.com ("Robert Hess") writes:
  12. >InitDialogs [Q]
  13. >This is probably a dumb question or an FAQ...
  14.  
  15. >What's wrong with calling InitDialogs from within an INIT? I've tried passing
  16. >in (0), (nil), ((ProcPtr) nil)...but I always crash at boot with an address
  17. >error (which isn't even recoverable from MacsBug...I can't even RS or RB, damn
  18. >it).
  19.  
  20. >What am I doing wrong?
  21.  
  22. >Thanks,
  23. >Robert
  24.  
  25. Well, you can't arbitrarily call InitDialogs without first setting up -all-
  26. of the other managers that it relies upon.  Typically you need to call the
  27. following routines first:
  28.  
  29.     InitGraf    (QuickDraw)
  30.     InitFonts    (Font Manager)
  31.     InitWindows    (Window Manager)    
  32.     TEInit        (TextEdit)
  33.  
  34. and -then-
  35.  
  36.     InitDialogs    (Dialog Manager)
  37.  
  38. Of course you need to allocate some local space for QuickDraw's A5 globals,
  39. which will be used while your INIT is running, but other than that, it's
  40. pretty straightforward...
  41.  
  42. steve
  43.  
  44. -- 
  45. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  46.   Steve Christensen            Never hit a man with glasses.
  47.   stevec@apple.com            Hit him with a baseball bat.
  48.