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