I
am looking for the preemptive style but without having to deal with cell values I guess. Are the cells bound to a temporary copy of the actual bound object perhaps? If so, then this temporary copy could be used for object level validation perhaps.
2011-01-05 12:52:42.739 PlatypusUniversal[34862:207] -[SubscriptionTVC tableViewModel:valueIsValidForRowAtIndexPath:] [Line 221] Is value valid for cell at <NSIndexPath 0x707a580> 2 indexes [0, 3]
2011-01-05 12:52:42.740 PlatypusUniversal[34862:207] -[SubscriptionTVC tableViewModel:valueIsValidForRowAtIndexPath:] [Line 221] Is value valid for cell at <NSIndexPath 0x707f7e0> 2 indexes [0, 4]
2011-01-05 12:52:42.740 PlatypusUniversal[34862:207] -[SubscriptionTVC tableViewModel:valueChangedForRowAtIndexPath:] [Line 164] value at <NSIndexPath 0x707f7e0> 2 indexes [0, 4] changed
The above is the logging output from a single click on
one switch in a form that has two switches. Both SCSwitchCells have their autovalidation set to FALSE and the validation method is invoked for
both cells every time I click
one switch. And then the valueChangedForRowAtIndexPath method is called. I was assuming by this time the value is set in the bound object but perhaps I am wrong in this assumption. The valueChangedForRowAtIndexPath callback is invoked well before I click the done button.
What I was hoping for is a callback that gets invoked once every time I change a cell value, with the bound object or a copy as the parameter, so I can perform validation logic that involves multiple properties of that object. Extending this idea even further, I can envision ArrayOfObjectSection level validation where the validity of one object depends on the existence of other objects in that section, for example if each row needs to have a unique name.
Maybe all this is simply not possible, not sure, just some food for thought
Regards,
Frank