On Wednesday 16 December 2009 07:04:02 am Jacek Kałucki wrote:
> Użytkownik John napisał:
> > as reported by JacekK
> >
> >   >Lets set Mask value to "#.##".
> >
> >   If DataField value equals e.g. 3.21, everything works fine.
> >   But when it returns value 1.2, masked.TextCtrl.ChangeValue() method
> > raises an exception,
> >   because string representation of real vale is "1.2" string, and it
> > doesn't meet the mask condition because of dot position.
> >   In wx implementation of NumCtrl class, there is special method named
> >
> >> _toGUI(), that handles this situation, but not in Dabo.
> >
> > How did the value '1.2' get into the data?  dMaskTextBox is used to
> > prevent such issues.  Or are you saying that the user has entered 1.2? 
> > The value could be 1.2x but not just 1.2.  Also there is a setting to
> > store the format along with the data.  I'll research the _toGUI() method
> > to see what it does - but it sounds like that's what suppose to happen?
>
> It's get updated from DataField source John.
> In database, there is float format, so result of conversion str(2.1) is
> "2.1" string not "2.10".



Ok now I understand.  That has been an issue with dMaskTextBox from day one.  
Everything has to match or you end up with nothing.  With my work I have only 
used dates and strings (like phone numbers).  That work well.  I think Larry 
has been successful in using the dMaskTextBox for all his input controls for 
gathering report criteria.  But the controls are not saving data to a DB.

Johnf
_______________________________________________
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