> BlockContext-write: anObject description: aDescription
>
> ^ self value: anObject
>
> The following becomes possible:
>
> ^ MADateDescription new
> selectorAccessor: #orderDate;
> beWithinYears: 2;
> stringWriter: [ :i | i mmddyyyy ];
> label: 'Order Date';
> beReadonly;
> beSearchable;
> yourself
>
> Is there a better way?
> Is this worth adding to the mainstream?
This is a nice trick. I am not a big fan of unnecessarily adding block-
contexts to my model. As soon as you want to make your meta-model
persistent or editable you run into troubles ...
What I usually did for my applications is to subclass the standard
string writer with my configuration for dates and times to generate
the desired output.
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki