• 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: addObserver:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: addObserver:


  • Subject: Re: addObserver:
  • From: Negm-Awad Amin <email@hidden>
  • Date: Mon, 11 Aug 2008 16:34:08 +0200


Am Mo,11.08.2008 um 16:15 schrieb Chris Idou:


I'm making the following call (and defining observeValueForKeyPath on self etc) on an NSArrayController, hoping to get notifications of it changing. But I don't seem to be getting any notifications. Should this work?



[arrayController addObserver:self
forKeyPath:@"content" options:(NSKeyValueObservingOptionNew| NSKeyValueObservingOptionOld)
context:nil];



You should set the observation to the observable property of the array controller, i. g. the "output". Use the key @"arrangedObjects" instead of @"content". (content is the bound property, the "input".)

Amin





_______________________________________________

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

Amin Negm-Awad email@hidden




_______________________________________________

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: 
 >addObserver: (From: Chris Idou <email@hidden>)

  • Prev by Date: Re: Sort Descriptor problem in NSTableView
  • Next by Date: Re: addObserver:
  • Previous by thread: addObserver:
  • Next by thread: Re: addObserver:
  • Index(es):
    • Date
    • Thread