Re: Deletes Object on Remove option
Re: Deletes Object on Remove option
- Subject: Re: Deletes Object on Remove option
- From: mmalcolm crawford <email@hidden>
- Date: Sun, 2 Apr 2006 11:46:01 -0700
On Apr 1, 2006, at 12:47 PM, email@hidden wrote:
For a contentSet binding, I have the "Deletes Object on Remove"
option set. I'd like to know if there is a way to change this
setting programmatically?
Re-establish the binding...
NSDictionary *info = [arrayController infoForBinding:@"contentSet"];
NSMutableDictionary *options = [NSMutableDictionary
dictionaryWithDictionary:
[info objectForKey:NSOptionsKey]];
BOOL deletesOnRemove =
[((NSNumber *)[options
objectForKey:NSDeletesObjectsOnRemoveBindingsOption]) boolValue];
deletesOnRemove = 1-deletesOnRemove;
[options setObject:[NSNumber numberWithBool:deletesOnRemove]
forKey:NSDeletesObjectsOnRemoveBindingsOption];
[arrayController bind:@"contentSet"
toObject:[info objectForKey:NSObservedObjectKey]
withKeyPath:[info objectForKey:NSObservedKeyPathKey]
options:options];
mmalc
_______________________________________________
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