NewValueHolder>>contents: anObject | oldValue | lock ifTrue: [ ^ self ]. lock := true. oldValue := contents. contents := anObject. [ self contentsChanged: oldValue ] ensure: [ lock := false ]. ^ contents
it is really interesting.. it appears you cannot change the contents of value holder (as you can see it will simply ignore it) when it 'locked' during announcing the change event. i know, this will prevent it from entering recursive loop, but i would instead throw an error in such case(s) because code which modifying the value as a reaction on value change is something really stupid and must be fixed, instead of putting workaround which will block the value holder from accepting new value(s).. and that is really bad: - notification(s) about some property change should not block the value from being able to be changed -- Best regards, Igor Stasenko.