• 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: Deletes Object on Remove option
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Deletes Object on Remove option
      • From: BK <email@hidden>
References: 
 >Deletes Object on Remove option (From: email@hidden)

  • Prev by Date: Tiger Intel AS Studio, eSellerate Integrated to Embedded transition
  • Next by Date: Re: Accessing the underlying managed object, from a controller
  • Previous by thread: Deletes Object on Remove option
  • Next by thread: Re: Deletes Object on Remove option
  • Index(es):
    • Date
    • Thread