home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 12866 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  1.7 KB

  1. Path: sparky!uunet!stanford.edu!agate!ocf.berkeley.edu!ewylie
  2. From: ewylie@ocf.berkeley.edu (Elizabeth Wylie)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: DLOG stuff....
  5. Date: 22 Jul 1992 20:24:24 GMT
  6. Organization: U. C. Berkeley Open Computing Facility
  7. Lines: 35
  8. Message-ID: <14kg5oINNdi8@agate.berkeley.edu>
  9. References: <144bvfINN8l6@agate.berkeley.edu> <scott.711532425@mcl> <scott.711783028@mcl>
  10. NNTP-Posting-Host: monsoon.berkeley.edu
  11.  
  12. >In <scott.711532425@mcl> scott@mcl.ucsb.edu (Scott Bronson) writes:
  13. >Do you see the bug?  The above code should read:
  14. >
  15. >           dp = GetNewDialog( 131, nil, (WindowPtr)-1L );
  16. >           if( dp ) {
  17. >               ModalDialog( nil, &i );
  18. >               DisposeDialog( dp );
  19. >           }
  20. >
  21. >
  22. >A rather embarassed...
  23. >
  24. >    - Scott
  25.  
  26. Don't feel so bad Scott, you would have never been burned anyway.  Page 413 of
  27. Inside Mac has a warning stating:
  28.  
  29. "If either the dialog template resource or the item list cannot be read, the function result is undefined."
  30.  
  31. I have never gotten nil as a result from GetNewDialog.  As far as I know, Apple hasn't bothered to fix the call yet.  Paranoid programmers (like myself) put
  32. envelope routines around GetNewDialog and Alert.  The routine reads in both
  33. the DITL and DLOG (or ALRT) resource and makes sure they're non-purgeable.
  34.  
  35. Then it calls GetNewDialog.  Window centering code that observes the system 7 flags under systm 6 can be inserted here as well.
  36.  
  37. Anybody out there know why apple likes to make our lives just a bit more interesting by not retuning error codes for the above routines and being so wierd about
  38. GetResource ?  It really pisses me off.
  39.  
  40. Hat to ramble, but my newsposter won't allow me to type less than I quote.
  41.  
  42. piss.
  43.  
  44. -E Wylie
  45. .
  46.  
  47.