19 Jul
2000
19 Jul
'00
3:07 p.m.
At 05:54 PM 7/19/00 +0300, Itamar Shtull-Trauring wrote:
"Phillip J. Eby" wrote:
If what you want is default values, then just put them in a DataSkin property sheet in the ZClass. Or, if using a Python class, implement them as class attributes named "class_default_for_X". E.g.:
I don't like ZClasses all that much, I'd rather not use them.
Okay, then override _objectAdding(). Just be sure to call the original implementation in your overridden version. _objectAdding() is always called with the invariants set up. Note, however, that if you use DataSkins outside of Racks, _objectAdding() is called when an object is moved or copied, as well as when added.