home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 13942 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  2.5 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!rochester!rit2!rit!cci632!sdk
  2. From: sdk@cci632.cci.com (Stephen Knight)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: IYourObject, Views, & ViewEdit
  5. Summary: I<yourobject> doesn't get called
  6. Keywords: MacApp views ViewEdit
  7. Message-ID: <1992Aug13.140119.12992@cci632.cci.com>
  8. Date: 13 Aug 92 14:01:19 GMT
  9. References: <1992Aug12.231336.1049@reed.edu>
  10. Sender: sdk@cci.com (steve knight)
  11. Organization: Northern Telecom, Ltd., Rochester, NY
  12. Lines: 44
  13.  
  14. In article <1992Aug12.231336.1049@reed.edu> bowman@reed.edu (Eric Bowman (bobo)) writes:
  15. >MacApp 3.0.1 question:
  16. >
  17. >I've created a window in ViewEdit with several views, including a couple of
  18. >subclasses of TTextListView.  When I close then window, MacApp drops into
  19. >Macsbug to tell me that I've handed FreeIfObject an invalid object.  I
  20. >thought the problem might be that IMyTextListView wasn't getting called.
  21. >This belief proved to be correct (though I have no idea if it's related to
  22. >the crashing...), which causes me some confusion.  So I played with the
  23. >skeleton app, and discovered that IViewSkeleton never gets called, either.
  24. >So what's up here?  411 says about TTextListView.ITextListView,
  25. >
  26. >Call?
  27. >    ALWAYS, if you are instantiating a TTextListView 
  28. >    object or creating a subclass of TTextListView. 
  29. >    If you are creating a subclass of TTextListView, 
  30. >    your I<Subclass> method of that subclass must call
  31. >    ITextListView.
  32. >
  33. >So what's up here?  None of the sample MacApp code calls the respective
  34. >IYourObject; in fact, most of the sample code never defines such a best
  35. >for their subclassed views.
  36.  
  37.   It seems that creating a view from a 'VIEW' resource isn't the same case
  38. as the documentation is talking about.  So you're absolutely right.
  39.   In your document's DoMakeViews, if your view is created via
  40. gViewServer->NewTemplateWindow then I<YourViewObject> is _not_ called.
  41. If you create your view from a procedure (check out DemoDialogs 
  42. MakeProcedureViews) then you have to call I<YourViewObject> yourself.
  43.   One way I've found around this is to create a DoPostCreate for my 
  44. view which _is_ called when I use a 'VIEW' resource.
  45.  
  46. >
  47. >On an unrelated note, my code and sample code no longer handles "<<<>>>"
  48. >correctly for window titles -> "Untitled 1", etc.  This worked fine under
  49. >ETO 7, but doesn't work with ETO 8.
  50.  
  51.   Lucky you, we seem to be at the tail end of the ETO distribution list
  52. (New Zealand gets theirs before we do, waaaaaaaa!).
  53.  
  54.  
  55. Hope this helps
  56. steve knight
  57. sdk@cci.com
  58.