Book a Demo

Author Topic: Deleting elements gets saved to file at once.  (Read 3417 times)

Luke1410

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Deleting elements gets saved to file at once.
« on: December 05, 2008, 08:54:23 am »
Environment:
EA 834, Windows XP SP3

How to reproduce:
1. create a new EA project (select the class model to start with)
2. add a new class to the model
3. save the project
4. delete the newly added class
5. close the document
6. reopen the document

experienced behavior:
the class has been removed

expected behavior:
the class should still be there

I find this behavior of EA a bit strange, because from other software I'm not used that changes are made to a file, unless it was saved. Is this behavior intended? Can it be changed (maybe by an option I missed in the settings)?

It just happened to me twice today that I mistakenly removed a class and had to get started with an old backup, because even though I didn't save the project, the classes were gone.
« Last Edit: December 05, 2008, 08:56:36 am by Luke1410 »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Deleting elements gets saved to file at once.
« Reply #1 on: December 08, 2008, 11:48:55 am »
Try not to think of EA as working in "document mode" like Word, Paint or Excel. It's a database application where if you delete an element, it deletes one or more records from the database, and usually there isn't an "undo" to save you.

The good news though, is that each individual diagram works in document mode, so removing an element from a diagram (by pressing the Delete key) isn't committed until you save the diagram, and undo can come to your rescue. However, take care with Ctrl+Delete, because that is a model (database mode) command, not a diagram (document mode) command, and undo won't reverse it.

You will soon be able to pick up which actions in EA are diagram mode and which are document mode. The rule of thumb is usually "could this action affect more than one diagram?"
« Last Edit: December 08, 2008, 11:49:40 am by KP »
The Sparx Team
[email protected]

Luke1410

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Deleting elements gets saved to file at once.
« Reply #2 on: December 08, 2008, 12:14:40 pm »
Thanks for the explanation.

So I guess I've to file a feature request, asking to add the undo-capability for model changes, too (though I guess that one has already been requested several times in the past :) ).

I'm just curious... Even if there's a database working in the backend, I'd have at least let the user work with a temp copy of the current db and purge all the changes only, if the user hit the save button.

Ok, I understand that if EA is used with a "real" db, that wouldn't be possible that easily, but for all users working with local EAP-files, that feature might save a lot of wasted time (due to unintentionally removing stuff from the current model).
« Last Edit: December 08, 2008, 12:15:14 pm by Luke1410 »