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

Re: Boggled By Bindings


  • Subject: Re: Boggled By Bindings
  • From: Scott Stevenson <email@hidden>
  • Date: Thu, 30 Sep 2004 16:20:35 -0700


On Sep 30, 2004, at 1:32 PM, Patrick Machielse wrote:

+ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key;
{
    if ( [key isEqualToString:@"infoString"] ) {
        return YES;
    }
    return [super automaticallyNotifiesObserversForKey:key];
}

since it seems NSArrayController doesn't return the default 'YES' value for
all keys (is this documented, somewhere?). Still, no success.

I think what you'd actually want here is:


+ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key; { if ( [key isEqualToString:@"arrangedObjects"] ) { return YES; } return [super automaticallyNotifiesObserversForKey:key]; }


The problem is that the key you're dependent on (arrangedObjects) isn't firing notifications by default. If it was, you should get change notifications for infoString as well. So all you *should* need to do is to activate the key you're dependent on.



Haven't tested it, though.

    - Scott



--
Tree House Ideas
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Boggled By Bindings (From: Patrick Machielse <email@hidden>)

  • Prev by Date: Re: Boggled By Bindings
  • Next by Date: Re: Boggled By Bindings
  • Previous by thread: Re: Boggled By Bindings
  • Next by thread: Re: How to scale an NSImage (with smaller memory size)?
  • Index(es):
    • Date
    • Thread