[squeak-dev] Magritte: Validation deprecated?

Philippe Marschall philippe.marschall at gmail.com
Fri Dec 5 06:04:25 UTC 2008


BTW there is the in NetworkAddress package in Magritte Add-Ons [1]
which provides an NAEmailDescription.

 [1] http://source.lukas-renggli.ch/magritteaddons.html

Cheers
Philippe

2008/12/4, Udo Schneider <Udo.Schneider at homeaddress.de>:
> All,
>
> I'm currently playing a bit with Magritte and I can !"§"&%! myself for
> not take a look at it earlier.
>
> One thing I'm not sure about at the moment is validation. It seems that
> validation code is not called when saving values.
>
> I'm having a description like this:
> descriptionEmail
> 	^ MAStringDescription new autoAccessor: 'name';
> 	group: 'Internet';
> 		 beEditable;
> 		 beSearchable;
> 		
> 		addCondition: [:value | self halt. (value includes: $@)
> 				and: [(value subStrings: $@) size = 2]]
> 		labelled: 'Invalid E-Mail';
> 		 comment: 'Please enter the name of the object';
> 		 default: 'Unnamed';
> 		 label: 'E-Mail'
>
> If I call the model using "model asMorph  addButtons; addWindow ;
> callInWorld" and save a bogus E-Mail the breakpoint is not reached.
>
> Are Conditions still supported?
>
> CU,
>
> Udo
>
>
>


More information about the Squeak-dev mailing list