If have an array of classes - myClass()
I can update class instances one at a time.
To check that something has actually changed I keep an “old” copy of the instance being updated in oMyClass. This isn’t an array since only one can be changed at a time.
The app includes a method that determines if Save should enable. This includes the line of code
If oMyClass <> nil then
If oMyClass <> myClass(idx) then saveButton.enabled = true
Operator_Compare is implemented in the class definition to run the comparison.
I assumed the Nil test could be used to determine if oMyClass has been created. Instead it seems to invoke Operator_Compare, since the right side is not being passed the Operator_Compare method falls over with a NilObjectException.
The enable save method can be called at other times when oMyClass may not exist … so how do you check, in these circumstances, it a class instance exists?