[squeak-dev] Re: Magritte Validation Question
Lukas Renggli
renggli at gmail.com
Fri Nov 6 09:27:47 UTC 2009
Looks like you've discovered yet another bug in exception handling.
I am looking into removing these resumable exceptions now. We should
not need to use them. That's too tricky.
Lukas
2009/11/5 Udo Schneider <Udo.Schneider at homeaddress.de>:
> After digging a bit more I think the following patch fixes the issue ... not
> sure if it breaks anything else though:
>
> MAKindError>>#isResumable
> ^ false
>
> CU,
>
> Udo
>
>
>
> Udo Schneider schrieb:
>>
>> Hi,
>>
>> I have a question regarding Magritte Validation. Given the following
>> description
>>
>> descriptionAcquireRetryDelay
>> ^ MANumberDescription new
>> selectorAccessor: #acquireRetryDelay
>> label: 'Aquire Retry Delay';
>> group: 'C3P0';
>> priority: 100;
>> beRequired;
>> beInteger;
>> bePositive;
>> yourself
>>
>> I do have a problem if the user enters a non-number. This is IMHO caused
>> by #bePositive which checks if a given number is positive by sending
>> #positive.
>>
>> However if the user enters "aaa" the object being validated is the String
>> ... which does not understand #positive.
>>
>> If I remove the #bePositive condition everything is find and I do get
>> (expected) Validation Errors complaining about invalid input and
>> non-integer.
>>
>> So I'm wondering if I need to somehow specify to check the #bePositive
>> condition (or any other condition for this case) only /after/ the correct
>> type has been validated/determined.
>>
>> Any pointers?
>>
>> CU,
>>
>> Udo
>>
>>
>>
>
>
>
--
Lukas Renggli
http://www.lukas-renggli.ch
More information about the Squeak-dev
mailing list
|