On Tue, 11 Sep 2007 00:38:16 -0300, "bulia byak" <buliabyak@...400...> wrote:
But it must perhaps set some flag which will let me find out if changes are currently allowed or not.
Hm, yes -- I think changability should be advertised on both SPDocument and XML::Document; it would probably be good to have an SPDocument signal which notified when the document was locked or unlocked, too.
Old code that does not check this flag, however, must simply notice nothing and fail silently and painlessly.
It may not always be silent and painless. Code which relies soley on repr notifications to update its state should be okay, but code which sets the repr and then assumes that whatever it set was taken may get out of sync and crash. We've had problems in the past with code that got confused by additional changes made from repr handlers, so likely we will have similar issues again.
I'm still torn both ways, but the one advantage to obvious crashes is that they get fixed quickly (versus more subtle bugs).
-mental