Ed Leafe wrote:
> 
> On Mar 28, 2010, at 12:07 PM, Ricardo Aráoz wrote:
> 
>   
>> So, you mean to tell me that in the bizObj validateField and
>> validateRecord are two independent things but in the form they are not?
>>     
> 
>       Not really. Of course in the bizobj they are two separate things, as 
> they are designed to deal with separate situations. But we are talking about 
> you calling save(), which is a series of events, any one of which can abort 
> the process.
>   
That was precisely my question. Does save() call both validateField and 
validateRecord()? I understood it should ONLY call validateRecord() (if I am 
not positioned on any field entry control). Is that so?

> The problem is that you are misunderstanding the order that things happen. 
> Before anything happens, the field validation must be dealt with.
That would be only for the control on which I'm standing when save() is issued?

> 
>> You mean to say I should subclass dTextBox for every control I must
>> validate?
>>     
> 
>       I honestly don't understand what makes you think that this would be 
> necessary.
>   
How would I otherwise override the onValueChanged() or the onLostFocus() 
methods of a dTextBox?

>   
>> Or subclass dTextBox and in the onLostFocus() ask for the name of the
>> control in order to call the appropriate validation function?
>>     
> 
>       How many of these special cases do you have? You mentioned a single 
> control whose color you want to reflect the validity of the content. Are you 
> now saying that you have many controls that need similar behaviors?
>   
Not really, you see, in my company the policy is that we do record validation, 
but that we visually warn the user (by setting ForeColor to red) on every field 
that's incorrect, but without interfering with his navigation of the form.

Thanks a lot Ed for your detailed explanations. Sorry to be such a pain.

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to