Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Boggled By Bindings




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.