• 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
Removing an Object with A Certain Title from an NSTreeController.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Removing an Object with A Certain Title from an NSTreeController.


  • Subject: Removing an Object with A Certain Title from an NSTreeController.
  • From: Joshua Garnham <email@hidden>
  • Date: Sat, 10 Oct 2009 04:25:57 -0700 (PDT)

Hi,

I am wondering how I could delete an object depending on it's title for the CoreData 'name' property I have.
To Add an Object I use this code:
NSManagedObjectContext *moc = [self managedObjectContext];
JGManagedObject *theParent =
    [NSEntityDescription insertNewObjectForEntityForName:@"projects"
                                  inManagedObjectContext:moc];
[theParent setValue:nil forKey:@"parent"];
// This is where you add the title from the string array
[theParent setValue:@"myTitle" forKey:@"name"];
[theParent setValue:[NSNumber numberWithInt:0] forKey:@"position"];

But I can't seem to find an equivalent function to remove An object.

You See, I have an array of strings so I was hoping I could loop through it deleting the objects with the title of any of the strings.

Cheers.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: releasing an object
  • Next by Date: Re: Snow Leopard: unsupported PointerFunctions configuration was requested
  • Previous by thread: Re: releasing an object
  • Next by thread: Re: Removing an Object with A Certain Title from an NSTreeController.
  • Index(es):
    • Date
    • Thread