1 Reply Latest reply on Aug 6, 2007 5:29 PM by ntsiii

    Copy Class and equals Overload

      I have a Form where the Form Items are Data bound to values in a custom class. The form has <Update> and <Restore> buttons that should update the database when a change has been made and restore the values on the form to the original values if any changes have been made and the user would like not make the changes and just reset them.

      It would be nice if these 2 buttons were not enabled until the values displayed on the form have been changed as an Update doesn't make sense if nothing changed. Same with restore. In order words, if the user types in anything into the form, the original class and the copy would no longer be equal.

      In Java, C# or C++ I'd use the operator overload feature to first make a copy of the object in question and then the equals operator overload to know when the copy is different than the original.

      Is there a good way to do this in ActionScript??