• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSView Docs. Was: Binding -- or not -- a button created in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: NSView Docs. Was: Binding -- or not -- a button created in code (From: Jerry Krinock <email@hidden>)
 >Re: NSView Docs. Was: Binding -- or not -- a button created in code (From: "Sean McBride" <email@hidden>)
 >Re: NSView Docs. Was: Binding -- or not -- a button created in code (From: Jerry Krinock <email@hidden>)
 >Re: NSView Docs. Was: Binding -- or not -- a button created in code (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Reading in UTF-8 to Data
  • Next by Date: Re: 1. NSStream Questions (Jon Loeliger)
  • Previous by thread: Re: NSView Docs. Was: Binding -- or not -- a button created in code
  • Next by thread: Pipelining HTTP Requests?
  • Index(es):
    • Date
    • Thread