home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 22304 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.6 KB  |  35 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!pageworks.com!world!eff!sol.ctr.columbia.edu!fnal.fnal.gov!gwatts
  3. From: gwatts@fnalo.fnal.gov
  4. Subject: Re: Verifying valid handles, how to?
  5. References: <1993Jan22.015520.1@fnalo.fnal.gov> <peter-230193180216@rocky.curtin.edu.au> <1993Jan26.010315.7120@wri.com> <mxmora-260193141225@css-mac1.sri.com>
  6. Followup-To: comp.sys.mac.programmer
  7. Sender: nobody@ctr.columbia.edu
  8. Organization: Fermi National Accelerator Lab
  9. Date: Thu, 28 Jan 1993 05:44:53 GMT
  10. Message-ID: <1993Jan27.234453.1@fnalo.fnal.gov>
  11. Lines: 20
  12. X-Posted-From: fnalo.fnal.gov
  13. NNTP-Posting-Host: sol.ctr.columbia.edu
  14.  
  15. Hi all,
  16.   I started off this thread.  And, now I can end it.  Not how I planned to
  17. end it.
  18.   Originally, I had a problem that I was deleted an object twice, and that
  19. I was calling a method on a dead object.  I'd wanted some code to check
  20. the object handle for validity (real object or not?).
  21.   Thanks for all your suggestions.  I tried some of them out tonight.  None
  22. of them worked.  So I followed the ThinkC code in MacsBug (ug!).  OPPPS.
  23. Turns out that Think C optimizes away most method calls when it dosen't need
  24. the object dispatcher.  This means the check code never gets a chance to see
  25. if the object is kosher.  Duh.
  26.   I can get around this.  Turn off Optomize Monomorphic Methods in the
  27. preferences dialog.  Then, it turns out that the ThinkC code will catch all
  28. the possible bad objects I send to it (including my original problem).  So,
  29. the lesson is: Turn off monomprhic method opt when debugging!
  30.   Thanks for the help, and sorry to lead y'all down a blind ally.
  31.  
  32.     Cheers,
  33.         Gordon.
  34. - Not waaarenteed for spelling.
  35.