On Friday 25 December 2009 05:09:05 pm Jacek Kałucki wrote:
> Hi,
>
> I have a data control bounded with database field that is validated
> dynamically.
> I mean, validation expression is based on current date.
> To my great surprise I found that data I entered some time ago gets
> invalid, when I browse them.
Then my guess would be that the validation code is incorrectly written.  

> After digging in code I found that dDataControlMixinBase.update() method,
> after taking control value from database, fires flushValue() method, which:
> - validates value
> - writes control value to database.
> IHMO this is completely redundant and should be done only after
> interactive value change.

Please show us the validateRecord code you are using.  If you are not using 
validateRecord please show us the complete code that you are using to 
validate the field.

> This behaviour with conjunction with broken numeric type handling
> in dMaskedTextBox class (setting dMaskedTextBox.Value to value
> of numeric type doesn't return numeric type value but string instead)
> causes that data cursor memento becomes dirty when there were
> no real changes in data value.

I acknowledged the above issue as it applies to you in the past - do you have 
a solution?  I'm not being smart with my question.  If you have an idea let's 
hear it.  The dMaskTextBox is a textbox and that means by design it works 
with strings.  Take a look at the properties "Value" and "Mask".  The doc 
string states it uses a string.  If you need a number only control check out 
the wiki
http://wiki.dabodev.com/HowToCreateANumberOnlyControl.  Or tells us what you 
are attempting to do maybe we can help.



> Is this everything by design?
> And yet another question, why only dTextBox class implements
> _inFlush semaphore but not entire data based control set?

There maybe inconsistencies in the code either by design (some controls 
require different properties)  or human error.    The dTextBox is one that 
has been enhanced and maybe not be consistent with other controls.

Johnf



 



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

Reply via email to