Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: of nibs and top level objects



Well, as we just illustrated, bindings retain what they are bound to. While the master ownership remains how you would expect it, the thing being bound to needs a way to tell the things binding to it to please let go now. I'm imagining there's something a lot like that going on when you tell the document to close.

Perhaps [NSDocument close] does setDocument:nil to its NSWindowController's who probably do something like what I had to do to its top level nib objects. Just speculating.

On Apr 10, 2006, at 2:21 PM, j o a r wrote:


On 10 apr 2006, at 22.50, mmalcolm crawford wrote:

<http://homepage.mac.com/mmalc/CocoaExamples/ controllers.html#memManagement>

From the page:

	"Model <--retains-- Controller <--retains-- View"

This feels weird to me. I'm not quite sure why. Perhaps because it's exactly the opposite of the "traditional" Cocoa MVC memory management relationships:

NSDocument --> retains --> NSWindowController --> (retains --> NSWindow -->) retains --> NSView

I would have to assume that there's a perfectly valid reason why you would choose to turn this upside down when you're programming with bindings?

j o a r


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >of nibs and top level objects (From: Paul Forgey <email@hidden>)
 >Re: of nibs and top level objects (From: j o a r <email@hidden>)
 >Re: of nibs and top level objects (From: Paul Forgey <email@hidden>)
 >Re: of nibs and top level objects (From: Paul Forgey <email@hidden>)
 >Re: of nibs and top level objects (From: Martin Wierschin <email@hidden>)
 >Re: of nibs and top level objects (From: Paul Forgey <email@hidden>)
 >Re: of nibs and top level objects (From: j o a r <email@hidden>)
 >Re: of nibs and top level objects (From: Paul Forgey <email@hidden>)
 >Re: of nibs and top level objects (From: j o a r <email@hidden>)
 >Re: of nibs and top level objects (From: Paul Forgey <email@hidden>)
 >Re: of nibs and top level objects (From: mmalcolm crawford <email@hidden>)
 >Re: of nibs and top level objects (From: j o a r <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.