mansrz / pymt

Automatically exported from code.google.com/p/pymt
0 stars 0 forks source link

MTCircularSlider needs CSS "slider-color" defined in user.css #243

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a MTCircularSlider with no user.css in $HOME/.pymt/user.css
2. pass it to runTouchApp()
3. application cannot be launched

What is the expected output? What do you see instead?
expected output: running application with a MTCircularSlider()
got output: application does not run:

Traceback (most recent call last):
  File "test.py", line 3, in <module>
    runTouchApp(MTCircularSlider(rotation=0.0))
  File
"/usr/lib64/python2.6/site-packages/PyMT-0.4-py2.6.egg/pymt/base.py", line
356, in runTouchApp
    pymt_window.mainloop()
  File
"/usr/lib64/python2.6/site-packages/PyMT-0.4-py2.6.egg/pymt/ui/window/win_pygame
.py",
line 185, in mainloop
    self._mainloop()
  File
"/usr/lib64/python2.6/site-packages/PyMT-0.4-py2.6.egg/pymt/ui/window/win_pygame
.py",
line 124, in _mainloop
    evloop.idle()
  File
"/usr/lib64/python2.6/site-packages/PyMT-0.4-py2.6.egg/pymt/base.py", line
205, in idle
    pymt_window.dispatch_event('on_draw')
  File
"/usr/lib64/python2.6/site-packages/PyMT-0.4-py2.6.egg/pymt/event.py", line
353, in dispatch_event
    event_type, args, getattr(self, event_type))
  File
"/usr/lib64/python2.6/site-packages/PyMT-0.4-py2.6.egg/pymt/event.py", line
348, in dispatch_event
    if func(*args):
  File
"/usr/lib64/python2.6/site-packages/PyMT-0.4-py2.6.egg/pymt/ui/window/__init__.p
y",
line 332, in on_draw
    w.dispatch_event('on_draw')
  File
"/usr/lib64/python2.6/site-packages/PyMT-0.4-py2.6.egg/pymt/event.py", line
353, in dispatch_event
    event_type, args, getattr(self, event_type))
  File
"/usr/lib64/python2.6/site-packages/PyMT-0.4-py2.6.egg/pymt/event.py", line
348, in dispatch_event
    if func(*args):
  File
"/usr/lib64/python2.6/site-packages/PyMT-0.4-py2.6.egg/pymt/ui/widgets/circulars
lider.py",
line 114, in on_draw
    set_color(*self.style.get('slider-color'))
TypeError: set_color() argument after * must be a sequence, not NoneType

What version of the product are you using? On what operating system?
git, commit 79dd6304bf7a2ed6633224d6cd2782f24d8d01c3
Gentoo GNU/Linux amd64 - 2.6.32 SMP

Please provide any additional information below.
simply put
* { slider-color: #000000; } in $HOME/.pymt/user.css to workaround the
problem. But it should work without it.

Original issue reported on code.google.com by ilya.cas...@gmail.com on 19 Apr 2010 at 9:44

GoogleCodeExporter commented 9 years ago
example showing the bug:

Original comment by ilya.cas...@gmail.com on 19 Apr 2010 at 9:45

Attachments:

GoogleCodeExporter commented 9 years ago
actually you can specify slider-color for circularslider only:

circularslider { slider-color: #000000; }

Original comment by ilya.cas...@gmail.com on 19 Apr 2010 at 9:47

GoogleCodeExporter commented 9 years ago

Original comment by txprog on 19 Apr 2010 at 11:39