Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!news.cs.indiana.edu!ux1.cso.uiuc.edu!pequod.cso.uiuc.edu!dorner From: dorner@pequod.cso.uiuc.edu (Steve Dorner) Newsgroups: comp.sys.mac.programmer Subject: Re: Check DialogPtr returned by GetNewDialog? Message-ID: <1991Apr2.142214.980@ux1.cso.uiuc.edu> Date: 2 Apr 91 14:22:14 GMT References: <1991Apr1.052536.27902@ux1.cso.uiuc.edu> <4143@uakari.primate.wisc.edu> <1991Apr1.224254.5399@neon.Stanford.EDU> Sender: usenet@ux1.cso.uiuc.edu (News) Organization: University of Illinois at U-C Lines: 24 >-> Do any of you check to see if the DialogPtr that GetNewDialog returns is >-> valid in any way? >>You want to read Technical Note 4 and then hold your breath in awe >>at the advice it gives: >> Assume there is no error >So what do you want do if there IS an error... put up an ALERT dialog? There are any number of reasonable things you could do, if you knew that GetNewDialog had failed: 1. Skip the alert, and hope for the best. 2. Pitch some clean windows, and then try an alert. 3. Put up a 'vital resource not found' alert (which might work). 4. Quietly ExitToShell. Any of these alternatives smell better than trying to put up an a nonexistent dialog. I agree with Apple in principle; there's a point at which things are SO BAD that I don't care what happens anymore. I'm not sure I would have pegged GetNewDialog as such a place, though. -- Steve Dorner, U of Illinois Computing Services Office Internet: s-dorner@uiuc.edu UUCP: uunet!uiucuxc!uiuc.edu!s-dorner