• 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
processRecentChanges without UndoManager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

processRecentChanges without UndoManager


  • Subject: processRecentChanges without UndoManager
  • From: Christian Pekeler <email@hidden>
  • Date: Wed, 3 Nov 2004 10:55:40 -0700

I don't explicitly use an undo manager in my WO project. The documentation for EOEditingContext.setUndoManager says:

You might invoke this method with null if the application doesn't need undo and you want to avoid the overhead of an undo stack.


It seems like EOEditingContext is using the undo manager internally, because if I do this:

editingContext.setUndoManager(null);
UndeletableEntity undeletableEntity = new UndeletableEntity();
editingContext.insertObject(undeletableEntity);
editingContext.deleteObject(undeletableEntity);
editingContext.saveChanges();

with:

public class UndeletableEntity extends EOGenericRecord {
...
public void validateForDelete() throws NSValidation.ValidationException {
super.validateForDelete();
throw new ValidationException("preventing deletion for testing purposes");
}
}


I get:

java.lang.IllegalStateException: Editing context needs an undo manager to recover from delete propagation problems. Do not set the undo manager of this editing context to null
at com.webobjects.eocontrol.EOEditingContext._processRecentChanges(EOEditin gContext.java:1694)
at com.webobjects.eocontrol.EOEditingContext._prepareForPushChanges(EOEditi ngContext.java:3179)
at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.j ava:3135)


So apparently it is not OK to set the undo manager to null. Am I misunderstanding something or is this a bug in EOEditingContext._processRecentChanges()?


Thanks, Christian

_______________________________________________
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: processRecentChanges without UndoManager
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Creating a login window
  • Next by Date: Re: processRecentChanges without UndoManager
  • Previous by thread: Re: close Connection of EOEditingContext
  • Next by thread: Re: processRecentChanges without UndoManager
  • Index(es):
    • Date
    • Thread