• 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
Detecting a deleted object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Detecting a deleted object


  • Subject: Detecting a deleted object
  • From: Miguel Arroz <email@hidden>
  • Date: Sat, 18 Feb 2006 21:26:02 +0000

Hi!

Imagine the following code (I'm writing this directly on the email, it's possible that it contains errors):


EOEditingContext myContext = getMyContexy();
MyClass myObject = giveMeSomeObjectOfMyClassSotredOnTheDataStorage (myContext);
myContext.deleteObject(myObject);
myContext.saveChanges();



Right after this, what exactly is myObject? Is there a way to know that it references a previously deleted object? The only way I can find is calling myObject.editingContext() and catch a NullPointerException, but that method is very very dirty... is there a better way?


  Yours

Miguel Arroz

"We have no sympathy for the lost souls
We've chosen the path of disgrace
We give this life to our children
And teach them to hate this place" -- Apocalyptica, Life Burns!

Miguel Arroz
http://www.ipragma.com


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Detecting a deleted object
      • From: Chuck Hill <email@hidden>
    • Re: Detecting a deleted object
      • From: Kieran Kelleher <email@hidden>
  • Prev by Date: Ingres customizations?
  • Next by Date: Re: Detecting a deleted object
  • Previous by thread: Ingres customizations?
  • Next by thread: Re: Detecting a deleted object
  • Index(es):
    • Date
    • Thread