Re: Read-only NSTableView bindings - forcing update [partially solved]
Re: Read-only NSTableView bindings - forcing update [partially solved]
- Subject: Re: Read-only NSTableView bindings - forcing update [partially solved]
- From: Andrew White <email@hidden>
- Date: Wed, 11 May 2005 12:30:08 +1000
Found the documentation pages on key-value observing.
documentation/Cocoa/Conceptual/KeyValueObserving/index.html
These allowed me to figure out willChangeValueForKey and
didChangeValueForKey, and thus get the updating all working right.
However, I initially tried to use
+ (void) initialize
{
[self setKeys: [NSArray arrayWithObject: @"myUnderlyingArray"]
triggerChangeNotificationsForDependentKey: @"myEntries"
];
}
- (NSArray *) myEntries
{
return myUnderlyingArray;
}
This did not seem to trigger the correct notifications for myEntries when I
used setArray on myUnderlyingArray. Am I missing something?
Assuming I do it manually rather than via setKeys, do I need to override
automaticallyNotifiesObserversForKey: for myEntries to make sure things
don't get messed up?
--
Andrew White
--------------------------------------------------------------------------
This email and any attachments may be confidential. They may contain legally
privileged information or copyright material. You should not read, copy,
use or disclose them without authorisation. If you are not an intended
recipient, please contact us at once by return email and then delete both
messages. We do not accept liability in connection with computer virus,
data corruption, delay, interruption, unauthorised access or unauthorised
amendment. This notice should not be removed.
_______________________________________________
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