smoothcontract / mediate

Automatically exported from code.google.com/p/mediate
0 stars 0 forks source link

undo support #88

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
add undo buffer - stringlist per UIObject? only create in designer mode -
per uiobjectlist? This would be populated for every change in the object
inspector - perhaps in the onupdate event, and for every change we perform
manually using the selection tools - although for those it should only
persist the change in the onmouseup event. These would be easy enough    
to rollback as we can just re-parse the uiobject against the modified xml.
how do we store a user context for this action in the change history view
though? e.g. size 80? Does the onupdate event log the property name or
property type? If so could use that to generate a description of each
change. See prototype event handler InspectorItemValueChanged. Seems     
simple enough to implement a global change history class, no need for
anything control or UIObject specific. Would just need to persist a string
for XML representation, object instance pointer and context details. Only
potential issues arise when we delete an object as we would have to remove
any entries for it from the change history. Actually we need to snapshot
the xml representation of the object in the onchanging event, since the
onchanged event will already hold the new value.

Original issue reported on code.google.com by aretman...@gmail.com on 10 Jun 2008 at 1:49

GoogleCodeExporter commented 9 years ago
integrate xml parsing functionality with undo support? maybe add an XML string
property with a getter/setter. could then add XML content to undo history 
object.
This approach still needs thought out with inherited objects since inherited 
property
changes would not be automatically cascaded down.

Original comment by aretman...@gmail.com on 10 Jun 2008 at 1:54

GoogleCodeExporter commented 9 years ago
add cancel/undo support for changes to objects using dialogs. May need to add a 
more
sophisticated mechanism to this to designer manager that we can call from 
various
places. Need to consider scenario of changing name of a related object. Can we 
undo
this? should be okay as we would have to undo the name change first presumably, 
so
maybe we can use a simple string representation of the object XML in the undo   

buffer. Only gotcha is with descendant objects, need a dependency list to sort 
this
out. Fun when we change the ancestor property for an object!

Original comment by aretman...@gmail.com on 10 Jun 2008 at 8:18

GoogleCodeExporter commented 9 years ago
add display of undo history items/actions in designer form

Original comment by aretman...@gmail.com on 10 Jun 2008 at 8:41

GoogleCodeExporter commented 9 years ago
refactor undo/redo updates and implement generic methods for applying property 
change
to all derived objects recursively. can use the same code for regular changes to
cascade changes from ancestors. change will need both current and new value so 
it can
check that the value is not overridden in the child object

Original comment by aretman...@gmail.com on 10 Jun 2008 at 8:42

GoogleCodeExporter commented 9 years ago
add new method to TAHMUIObject to snapshot XML draft of itself when we are 
about to
change the objects ancestor. This allows the change cascades to propagate, but 
we
will need to add add a list of ancestor object chains first so we can do this
recursively.

Original comment by aretman...@gmail.com on 10 Jun 2008 at 8:44

GoogleCodeExporter commented 9 years ago
process for applying changes to properties.. needs to cascade to descendants and
support undo. need to investigate RTTI support for this...

Original comment by aretman...@gmail.com on 10 Jun 2008 at 8:44

GoogleCodeExporter commented 9 years ago
editing colours using dialog or double clicking doesn't add an undo item

Original comment by aretman...@gmail.com on 10 Jun 2008 at 8:45

GoogleCodeExporter commented 9 years ago

Original comment by aretman...@gmail.com on 11 Jan 2009 at 1:43