• 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: "Sean McBride" <email@hidden>
  • Date: Fri, 9 Jul 2010 17:30:32 -0400
  • Organization: Rogue Research Inc.

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.  IIRC,
viewWillMoveToWindow:nil is sent to a view during a window's
finalization... ah, here's what I was thinking of:

<http://www.mail-archive.com/email@hidden/msg36330.html>

Anyway, I previously used a DTS incident and talked to people at WWDC
about all this.  The conclusion was: on 10.5, an NSView's finalize is
always called on the main thread, so you can safely call
removeObserver:forKeyPath: to undo KVO started previously.  In 10.6, kvo
is done with weak referencing, so you don't have anything you need to do.

>> Note that if you use NSView's fullscreen method ...
>
>Arghhh.  I'll put that in the "If we don't leave a few bugs for later we
>could never ship anything" pile.

:) In my case it was a big deal, because full screen is an important feature.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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

  • Follow-Ups:
    • Re: NSView Docs. Was: Binding -- or not -- a button created in code
      • From: Jerry Krinock <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>)

  • Prev by Date: Re: trapping each iteration of run loop?
  • Next by Date: Re: trapping each iteration of run loop?
  • Previous by thread: Re: NSView Docs. Was: Binding -- or not -- a button created in code
  • Next by thread: Re: NSView Docs. Was: Binding -- or not -- a button created in code
  • Index(es):
    • Date
    • Thread