In the coming description of the components of a model, you'll see that every possible property is assigned a default value.
This default value will be used if you omit it in your definition. For
example, a component AString representing a string attribute has a
default value of 255
assigned to its width
. This default value
may, or may be not, what you need. To avoid the unnecessary overhead of
overwriting the defaults in each component AString, you can set a
different default for one, or more, of its properties:
AString.defaults['width']=30 AString.defaults['externalType']='TEXT'
This is a general mechanism that you can use for every single property defined
by a component, simply by changing the corresponding entry in the component
class's dictionary defaults
.
Comments are welcome: Sebastien Bigaret / Modeling Home Page