Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread vincent habchi
Le 26 avr. 2010 à 15:50, Jack Nutting a écrit : > Well I haven't actually tried it yet, so don't thank me yet! ;) The > docs for "initWithEntity:insertIntoManagedObjectContext :" do include > the text "If context is not nil, this method..." though, which seems > to imply that you should be able

Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread vincent habchi
Le 26 avr. 2010 à 15:50, Jack Nutting a écrit : > Well I haven't actually tried it yet, so don't thank me yet! ;) The > docs for "initWithEntity:insertIntoManagedObjectContext :" do include > the text "If context is not nil, this method..." though, which seems > to imply that you should be able

Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread Jack Nutting
On Mon, Apr 26, 2010 at 3:46 PM, Joanna Carter wrote: > Hi Jack > >> Right, but we were talking about passing in nil as the context when >> creating the object, so there's no context to remove it from. > > That's interesting. I have never tried using a nil context. Something more to > add to my k

Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread Joanna Carter
Hi Jack > Right, but we were talking about passing in nil as the context when > creating the object, so there's no context to remove it from. That's interesting. I have never tried using a nil context. Something more to add to my knowledge repository :-) Thank you Joanna -- Joanna Carter Cart

Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread Jack Nutting
Hi Joanna, On Mon, Apr 26, 2010 at 3:11 PM, Joanna Carter wrote: > >> Good question.  I believe a simple release/autorelease will do. > > If the object has been created by inserting into the context, then it would > have to be removed from the contrext. > > Joanna Right, but we were talking abo

Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread Joanna Carter
Hi Jack > Good question. I believe a simple release/autorelease will do. If the object has been created by inserting into the context, then it would have to be removed from the contrext. Joanna -- Joanna Carter Carter Consulting ___ Cocoa-dev mail

Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread Jack Nutting
On Mon, Apr 26, 2010 at 11:36 AM, vincent habchi wrote: > By the way, how do you delete these objects with a null MOC, since you are > supposed to call [MOC deleteObject:]? > Vincent Good question. I believe a simple release/autorelease will do. -- // jack // http://nuthole.com // http://lear

Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread vincent habchi
Le 26 avr. 2010 à 11:04, Jack Nutting a écrit : > // assuming your app delegate contains the "managedObjectModel" method, which > // the standard Xcode-generated CoreData app typically does > NSManagedObjectModel *managedObjectModel = [[NSApplication delegate] > managedObjectModel]; > NSEntityDesc