Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!well!gurgle From: gurgle@well.sf.ca.us (Pete Gontier) Newsgroups: comp.sys.mac.programmer Subject: Re: Check DialogPtr returned by GetNewDialog?=YES + DETAILED SOLUTION Message-ID: <24101@well.sf.ca.us> Date: 9 Apr 91 02:39:29 GMT References: <1991Apr5.225347.3100@dartvax.dartmouth.edu> Organization: cellular Lines: 25 In article <1991Apr5.225347.3100@dartvax.dartmouth.edu> ari@eleazar.dartmouth.edu (Ari Halberstadt) writes: > A. The disk containing the application could have been placed offline. > B. There may not be anough memory to create the dialog. > 1. Make sure the 'DLOG' resource is loaded and is not a nil handle > 2. Do the same for the 'DITL' resource. > 3. Allocate a pointer to contain the dialog, after making sure that > 4. Save the current value of ResErrProc, and install your own > 5. Call GetNewDialog, passing it the pointer allocated in step 3. > 6. Restore the value of ResErrProc. Then check the value returned by > 7. If the dialog pointer is nil, try to display an error message. The >8. Recover from the dialog error as appropriate for your application. Maybe I'm missing something here, but whatever happened to... GetNewDialog, check for a nil pointer ResError MemError On failure, make an appeal to either... an earlier CouldAlert Notification Manager -- Pete Gontier, gurgle@well.sf.ca.us Software Imagineer, Kiwi Software, Inc.