Sibylle Koczian wrote: > Hello, > > there are some things I don't understand about dSpinner, and, I think, a bug > in its documentation > (http://paul.dabodev.com/doc/api/dabodoc/dabo.ui.uiwx.dSpinner.dSpinner.html): > > > Is this really the right text for _this_ component? > > "Class dSpinner > Creates a panel, a basic container for controls. This panel, unlike the plain > dPanel class, inherits from the Data Control mixin class, which makes it > useful building composite controls that have a Value that can be bound like > any simple control."
The doc generation assumes that there's a valid docstring for the class, or that the parent's docstring accurately describes the class. This isn't true for many classes unfortunately. I realized the error months ago but thought if I left it in it would spur us to add docstrings to our classes... ;) > (And shouldn't it be "which makes it useful _for_ building composite > controls ..." or something like that?) > > In the DaboDemo for the component I noticed that the non-wrapping spinner > can't be moved by its arrows below its starting value, although the minimum > value is lower. And if I change the increment to 0.25 and the starting value > to 5.5, it can only be moved up to 7.75, not to 10, as it should. Hmm... Ed? > The spinner problem I started out with: I'm trying to work through > the "Step-to-Step guide to Dabo programming". But I don't really want to > install MySQL (Gentoo doesn't seem to give me the right packages for a > client-only install), so I thought I'd simply create the database with > SQLite. Which works up to a point, only when I run the "hours" form and use > the spinner for the "hours" field, I get this error: > > Traceback (most recent call last): > > File > "/usr/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dSpinner.py", > > line 82, in __onWxSpinDown > if self._spinDown(): > > File > "/usr/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dSpinner.py", > > line 106, in _spinDown > new = curr - self.Increment > TypeError: unsupported operand type(s) for -: 'Decimal' and 'float' > > Probably because SQLite hasn't got a Decimal type, right? How to work around > this? Of course just for the tutorial I could use Firebird which is my > preference for client-server applications. But I've got some small apps where > even Firebird would be overkill and SQLite seems just right. So I'd like to > clear this up. No it looks like Dabo's recognizing a Decimal field where it should, but Increment is float. But Decimals can't interact with floats directly - the float needs to be converted to a Decimal or an Int first. We need to fix this in Dabo. Can you register yourself and add a ticket at https://trac.dabodev.com, showing this traceback? 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]
