On 2015-06-05 14:53, Basile Burg wrote:

No, you don't get my point with setters: if a during the deserialization
you restore, let's say, the _width field and that 12 children controls
rely on this field then they won't be aware of the change.
But if the deserializer restores using the width(int value) setter, the
children can be resized if the the setter contain a sub method like
updateChildren()...

If the whole code is written in D then that's not necessary. The children will be restored properly as well. But if you have a D class that wraps a native GUI control with a setter that calls some method on the native control then it would be necessary to call the setter when deserializing.

--
/Jacob Carlborg

Reply via email to