• 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
KVO on NSDictionary elements
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

KVO on NSDictionary elements


  • Subject: KVO on NSDictionary elements
  • From: Gustavo Pizano <email@hidden>
  • Date: Thu, 11 Mar 2010 11:19:35 +0100

Hello all.
Im implementing a live filter, and each, time I insert a filter in the filterDictionary the controller (which is another class) gets notified about the insertion.\
I was reading the KVO, and its says something about NSKeyValueChangeKindKey.

So this is what Im doing in the Controller class:

[_filterController addObserver:self forKeyPath:@"_filterSettings" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:NULL];

so I undertand that as it is above I will get notified only when I setUp a new NSDictionary in the ivar _filterSettings, obviously Im not getting notified when I insert something in the _filterSettings dictionary.

How should I add the observer? is it possible to do so?

thanks

 Gustavo


_______________________________________________

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

  • Prev by Date: Re: Core Animation vs. Basic Cocoa Graphics
  • Next by Date: Re: How to debug this error on closing a document?
  • Previous by thread: Re: Better sorting using threads?
  • Next by thread: Unable to receive keyDown Event in NSBorderlesswindow
  • Index(es):
    • Date
    • Thread