On Thu, August 21, 2008 10:46 am, Keith Hodges wrote:
It takes a copy of the original, then compares the
model to the copy to
make sure that no one else has changed it in the mean time, before
applying the new one.
If your real memento copy is not a completely independent copy then it
may be modifying the model by accident. On commit it finds the model has
changed.
How does it determine (I guess I can pilfer thru the code tonight) if the
model has changed? It's not like C++ comparing pointers -- is it doing a
bit-wise compare of each field (In a general sense)...?
Hmm.. In this case the model should not have changed -- it was rendered
and then I pressed the 'save' button w/o any changes.. I guess I'll have to
dig into the bowels of the RealMemento code (assuming that's where the
compare is being done)..
BTW -- what's the difference between MARealMemento and
MARealCheckedMemento? I'm currently using MARealCheckedMemento --
not sure if that matters or not.. I only used that version because the
default Magritte one was MACheckedMemento IIRC.
-- Rick