On 10/29/10 2:28 PM, John Fabiani wrote:
> On Friday, October 29, 2010 12:57:33 pm John Fabiani wrote:
>> On Friday, October 29, 2010 10:41:40 am Jacek Kałucki wrote:
>>> Użytkownik Ed Leafe napisał:
>>>> On Oct 29, 2010, at 12:39 PM, John Fabiani wrote:
>>>>> Here are my symptoms:
>>>>>
>>>>> Type in a number within the min and max of the spinner.  Use the tab
>>>>> key and the value will revert to the old val.
>>>>>
>>>>    Paul recently removed a call to flushValue(), so that might explain
>>>>    your symptoms.
>>>>
>>>>    Try adding the line:
>>>> self.flushValue()
>>>
>>> The flushValue() is called in _spin() and in LostFocus event.
>>> John, did you typed your code in mail or pasted from module?
>>> Could you put exact few code lines on http://dabo.codepad.org/ ?
>>
>> I'll create a demo.  And then post.
>> Johnf
>
> OK I have some demo code.
> http://dabo.codepad.org/VS0YEWHF
>
> The interesting thing is on Linux I can't get the numbers to increment using
> the mouse.   On windows the mouse will increment but if you tab off the
> spinner the value will revert to the old val.
>
> This should be self running code (using sqlite memory data).

I've only tested on Mac so far, but I saw oddities when dealing with floats as 
you 
are using for Min, Max, and Increment. When I changed those to Decimal, 
everything 
seemed to work on Mac.

These oddities were seen back in r6012 of over a month ago. I didn't test 
further 
back than that.

So try adding 'from decimal import Decimal' at the top, and changing your 
spinner 
construction to:

spin = dabo.ui.dSpinner(self, DataSource='test', DataField='testnum',
     Width=150, Max=Decimal("999.00"), Min=Decimal("0.0"),
     Increment=Decimal("1.00"))

Let us know if it works now. If so, we have a problem comparing decimal to 
float or 
something.

Paul

_______________________________________________
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