Jacek Kałucki wrote:
> Użytkownik Paul McNett napisał:
>> Jacek Kałucki wrote:
>>    
>>> Użytkownik Paul McNett napisał:
>>>      
>>>> I'm not seeing this (Linux using the dabo/ui/uiwx/dGrid.py test case).
>>>>
>>>>        
>>> For me too works on Ubuntu, although decimal point isn't accepted.
>>> But on Windows platform I receive error as mentioned before.
>>>      
>> Yeah, I noticed the decimal point problem, too. Dabo needs a lot more work 
>> on the
>> grid cell renderers/editors. That error you are getting is highly likely to 
>> be at the
>> wx level, so the first debugging step would be to establish or refute that 
>> with a
>> simple wx-only test.
>>    
> 
> I created replacement class for dColumn class that solve both issues.
> <code>
> import dabo.ui
> from decimal import Decimal
> 
> class cGridColumn(dabo.ui.dColumn):
> 
>      def _beforeInit(self):
>          super(cGridColumn, self)._beforeInit()
>          # Modify the cell renderer and editor classes
>          self.decimalRendererClass = self.floatRendererClass
>          self.decimalEditorClass = self.floatEditorClass
> 
>          self.defaultRenderers = {
>              "decimal" : self.decimalRendererClass,
>              Decimal: self.decimalRendererClass,
>          }
>          self.defaultEditors = {
>              "decimal" : self.decimalEditorClass,
>              Decimal: self.decimalEditorClass,
>          }
> </code>
> 
> After this modification, everything works, exceptions are gone and 
> decimal point works too...
> Any comments?

Yes, thanks for pointing out that the number renderer/editor wasn't the 
appropriate 
one to use for decimals. See my latest commit.


> BTW, probably dGridDataTable.IsEmptyCell() needs some reworking
> (some redundant/unreachable code).

Done, thanks. I guess I left that in after a refactor.

Paul

_______________________________________________
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