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". -- Regards Jacek Kałucki _______________________________________________ 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]
