| Issue 225: | circularslider : _get_value function returns always the same value? | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. start with the widget example 2. try to read the value self._value 3. affecting self.slider_fill_angle to it in touch_move partly solves the pb: self._value = self.slider_fill_angle # * (self.max - self.min) / self.sweep_angle + self.min What is the expected output? What do you see instead? i m trying to get returned the changing value of the widget, inside the default 0 to 100 range instead i get a fixed value for self._value whatever i do with the widget What version of the product are you using? On what operating system? python2.6 pymt0.4 ubuntu9.10 Please provide any additional information below.
Apr 3, 2010
#1
awa...@gmail.com
Apr 5, 2010
You should not use ._value, but .value ! Can you provide a test case that failed ?
Apr 7, 2010
I didn't found anything on circularslider. I'll close this issue, reopen with a test case if it's continue to fail !
Status:
WontFix
Apr 7, 2010
just added this at the end of the circularslider file in pymt-0.4 examples
@cm4.event
def lapin():
print cm4.value
1) First
i get the following below :
user@ubuntu:~/pymt-examples-0.4/widgets$ python circularslider2.py
[INFO ] PyMT v0.4
[INFO ] [Camera ] using <gstreamer> as camera provider
[INFO ] [Logger ] Record log in /home/user/.pymt/logs/pymt_10-04-07_28.txt
[INFO ] [Text ] using <pygame> as text provider
[INFO ] [Video ] using <gstreamer> as video provider
[INFO ] [OSC ] using <multiprocessing> for socket
[INFO ] [Loader ] using <pygame> as thread loader
/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/ui/widgets/flippable.py:106:
SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert(to in 'back', 'front')
/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/ui/widgets/composed/modalpopup.py:56:
SyntaxWarning: import * only allowed at module level
def on_popup_draw(self):
[INFO ] [Window ] use Pygame as window provider.
[INFO ] [Window ] OpenGL version <2.1.2 NVIDIA 173.14.20>
[INFO ] [Base ] Start application main loop
[INFO ] [OSC ] listening for Tuio on 0.0.0.0:3333
[INFO ] [Base ] Leaving application in progress...
Traceback (most recent call last):
File "circularslider2.py", line 21, in <module>
runTouchApp()
File "/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/base.py", line
356, in runTouchApp
pymt_window.mainloop()
File
"/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/ui/window/win_pygame.py",
line 186, in mainloop
self._mainloop()
File
"/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/ui/window/win_pygame.py",
line 125, in _mainloop
evloop.idle()
File "/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/base.py", line
200, in idle
self.dispatch_input()
File "/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/base.py", line
185, in dispatch_input
self.post_dispatch_input(type=type, touch=touch)
File "/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/base.py", line
120, in post_dispatch_input
listener.dispatch_event('on_touch_move', touch)
File "/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/event.py",
line 353, in dispatch_event
event_type, args, getattr(self, event_type))
File "/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/event.py",
line 348, in dispatch_event
if func(*args):
File
"/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/ui/window/__init__.py",
line 353, in on_touch_move
if w.dispatch_event('on_touch_move', touch):
File "/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/event.py",
line 353, in dispatch_event
event_type, args, getattr(self, event_type))
File "/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/event.py",
line 348, in dispatch_event
if func(*args):
File
"/usr/local/lib/python2.6/dist-packages/PyMT-0.4-py2.6.egg/pymt/ui/widgets/circularslider.py",
line 102, in on_touch_move
print self._get_value()
TypeError: _get_value() takes exactly 2 arguments (1 given)
2) After modifying Pymt, line 122
def _get_value(self, value):
return self._value
should be :
def _get_value(self):
return self._value
no error anymore but no print ..
i don t get it
|