At 02:43 PM 10/10/2001 -0500, Ian Bicking wrote:
>I don't believe the model (currently) has a place where you can
>provide greater annotation as to what values are valid. I.e., you can
>tell the model an int is valid, but not that is must be between 1 and
>10. It would be appropriate to add this to the model, and then
>generate the field (with validators) off of that. With a bit of work,
>I suppose you would also want to have the generated class assert those
>same validations, to guard from programmer error as well as input
>error.
That specific validation is already there. The columns are called Min and
Max, and yes they are asserted in the set columns.
Also you can add any columns you want to the object model, either as a
direct CSV column, or as a field in extras:
Extras
foo=1; bar='c'
And then use those in code you write that examines MK Attrs, which are
essentially dictionaries. (Attr inherits UserDict.) Here is a silly example:
for attr in klass.allAttrs():
print attr.get('Min', None)
Breeze through MiddleKit/Core which doesn't do much more than define the
code classes that MK uses to represent an object model.
-Chuck
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss