• 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: Keary Suska <email@hidden>
  • Date: Mon, 11 Aug 2008 08:38:18 -0600
  • Thread-topic: addObserver:

8/11/08 8:15 AM, also sprach email@hidden:

> 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];

It works, but perhaps not the way you want it to. You will receive
notifications any time the "content" property of your array controller is
changed (or led to believe that it has changed). I.e. any time the array
object itself is changed to another array object, *not* when the elements of
the array are changed.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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: addObserver:
  • Next by Date: Re: How to check the capital letter?
  • Previous by thread: Re: addObserver:
  • Next by thread: Table Column NSSegmentedCell - Segment not Selecting
  • Index(es):
    • Date
    • Thread