Re: Custom view controller
Re: Custom view controller
- Subject: Re: Custom view controller
- From: Cathy Shive <email@hidden>
- Date: Wed, 5 Nov 2008 16:01:41 +0100
Hi Tom,
The design from the posts is identical to the one I use for the non-
NSViewController based view controllers that I have to use (for the
same reason as you) - so it can still work for you :) The concepts are
the same. You just have to deal with the extra issues that you're
talking about here. I have no idea what NSWindowController and
NSViewController do to solve the problem, I agree, it would be great
to know!
One other possible issue - is there a table view in the mix? Is its
data source or delegate set to be the view controller? If so, try
setting its delegate and data sources to 'nil' in the same method you
use to remove the bindings. This was the cause of a similar problem
I had in a custom view controller - it's a shot in the dark and I
can't explain it, but maybe...
Best of luck,
Cathy
Hi Raphael and Cathy - thanks both for your replies.
I already implemented top-level objects relasing, that was simple
(although the objects are not released because dealloc is not
called...) - in fact my code is almoust identical to the one shown
below. On the other hand I do bind an NSArrayController within the nib
to the file's owner, so this is probably the cause. I'll check your
code and see how I can adapt it to my case.
Looking at your answer, my original question could be translated into
"what do NSWindowController and NSViewController 'just have something
built into their implementations to take care of it for you'"... Would
be nice to know... good shot huh... ;-)
By the way, I also looked at yours and Jonathans excellent
XSViewController code and articles, but it is built on top of
NSViewController, so cannot work for me unfortunately. I'll check more
closely to see when you're sending the mentioned messages.
Tom
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden