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

  1. Path: sparky!uunet!mcsun!corton!sophia!taloa!news
  2. From: kjartan@ecu.unice.fr (Kjartan Pierre Emilsson)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: Destroying Zones
  5. Keywords: zones,dynamic loading
  6. Message-ID: <1992Jul28.123612.6352@taloa.unice.fr>
  7. Date: 28 Jul 92 12:36:12 GMT
  8. References: <4483@rosie.NeXT.COM>
  9. Sender: news@taloa.unice.fr (Usenet News)
  10. Reply-To: kjartan@ecu.unice.fr
  11. Organization: University of Nice Sophia-Antipolis, France
  12. Lines: 33
  13. Nntp-Posting-Host: ecu.unice.fr
  14.  
  15. This talk about destroying zones to get rid of objects, reminds me of a  
  16. strange bug I have encountered recently:
  17.  
  18. I have a program, which dynamically loads modules, with their own nib and  
  19. objects.  I created a zone for the File's owner object, which eventually  
  20. loaded the nib file into that zone.  Each time I loaded a new module, I  
  21. unloaded the previous module and destroyed its zone to get rid of  
  22. everything.  In addition to that, I did not use the modules' window, but  
  23. stealed its view hierarchy which I then added as a content view of the  
  24. main program window.  This worked fine, until I put a ColorWell in one of  
  25. my modules.  What happened then, was that the ColorWell behaved correctly  
  26. the first time the module was loaded, but if I loaded it later and  
  27. activated the Well, the program crashed.
  28. The only way I could make it work was to put one ColorWell in the main  
  29. window, such that that class would always be loaded.  I don't know the  
  30. real reason for this bug, but I guess that once you pop up a color panel  
  31. using the ColorWell, the panel must somehow remember who popped him up, so  
  32. if you then destroy the module and the ColorWell with it, the next time  
  33. you try to popup the Color Panel, it tries to send a message to its  
  34. previous Well.  Does anybody have clues to this problem ?  Are there other  
  35. objects with the same behaviour ?  What is the criterion which determines  
  36. whether an object will not support a zone destroy ?
  37.  
  38. -Kjartan
  39.  
  40. PS.:  How does one build a shared library with some custom classes, say  
  41. for example a library corresponding to a user defined palette ?
  42. --
  43. Kjartan Pierre Emilsson            e-mail: kjartan@ecu.unice.fr
  44. Non-Linear Institute of Nice        tel.: 93 52 98 36
  45. Universite de Nice - Sophia Antipolis    fax: 93 52 98 48
  46. Parc Valrose
  47. Nice, FRANCE
  48.