S
Steve
I know this should not be difficult but I'm stuck.
I have an object that's made up of several other objects. The details
don't matter but it's moderately complex. I have a form that users can
select when they wish to make changes to the object properties. For a
number of reasons, I want to commit the changes immediately as they are
made by the user (largely because of the impact on other calculations).
However, I want to give users the opportunity to Cancel changes and
revert to the values that existed before they displayed the form.
I have done a deep copy of the object as it exists when the user
selects the form and that seems to be working OK. I'm stuck trying to
revert to the saved values when the user clicks the cancel button.
I know I can use brute force to run through all properties and assign
the values but this is cumbersome and I know that there must be a
better way. Suggestions appreciated.
Steve
I have an object that's made up of several other objects. The details
don't matter but it's moderately complex. I have a form that users can
select when they wish to make changes to the object properties. For a
number of reasons, I want to commit the changes immediately as they are
made by the user (largely because of the impact on other calculations).
However, I want to give users the opportunity to Cancel changes and
revert to the values that existed before they displayed the form.
I have done a deep copy of the object as it exists when the user
selects the form and that seems to be working OK. I'm stuck trying to
revert to the saved values when the user clicks the cancel button.
I know I can use brute force to run through all properties and assign
the values but this is cumbersome and I know that there must be a
better way. Suggestions appreciated.
Steve