Re: NSView Docs. Was: Binding -- or not -- a button created in code
Re: NSView Docs. Was: Binding -- or not -- a button created in code
- Subject: Re: NSView Docs. Was: Binding -- or not -- a button created in code
- From: Jerry Krinock <email@hidden>
- Date: Fri, 16 Jul 2010 12:31:38 -0700
On 2010 Jul 09, at 14:30, Sean McBride wrote:
> On Fri, 9 Jul 2010 13:38:36 -0700, Jerry Krinock said:
>
>>> mmalc has some comments on unbinding here:
>>> <http://homepage.mac.com/mmalc/CocoaExamples/controllers.html#unbinding>
>>
>> I wonder if mmalc saw any advantage to using -viewWillMoveToSuperview:
>> vs. -viewWillMoveToWindow: for unbinding/unobserving? It seems like
>> they'd both do about the same thing.
>
> My memory is fuzzy, but it might have had to do with GC.
Just learned that -viewWillMoveToSuperview: is better for non-GC too. In this case:
window content view
RBSplitView
NSTabView
NSTabView
Custom View
-viewWillMoveToWindow: does not get invoked when window loads or closes, but -viewWillMoveToSuperview: does. I believe that both worked before nesting in the second tab view, but I ain't looking back today.
Conclusion: Use -viewWillMoveToWindow: like mmalc said.
_______________________________________________
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