#doValidate

Damien Cassou damien.cassou at laposte.net
Sun Nov 27 12:24:27 MET 2005



Philippe Marschall a écrit :

>>YourCommand>>validate
>>  MAValidationError on: self
>>
>>Or one of the subclasses
>>    
>>
>
>Are you really sure about this?
>- I can see no #validate in the command hierarchy, #exceute still
>sends #doValdiate
>- MAValidationError is abstract
>- PRRemoveCommand >> #doValidate
>	super doValidate.
>	(self structure isRoot)
>		ifTrue: [ self error: 'Unable to remove root node.' ].
>
>#error: is the one from Object
>  
>
The problem if you use #error is that the error message is not user 
friendly. Using MAError display just a few lines in top of your form. 
Use doValidate instead of validat which doesn't exist :-) sorry



More information about the SmallWiki mailing list