Thread: [ocemp-devel] Style changes in OcempGUI
Status: Beta
Brought to you by:
marcusva
From: Marcus v. A. <ma...@sy...> - 2005-05-25 11:57:19
|
Hello, the first version of OcempGUI (up to 0.0.6) had an ugly style support. This will change with the upcoming version 0.0.7, in which the Style class resides in the widget package. Every widget now can support several states with the new design, so a fine grained visible diversion of the look and feel can be made. This also means, that the next release will not be compatible with previous releases. I apologize for those circumstances, but the benefit is much higher than the problems with the broken compatibility. First parts of those changes are checked in today and seem to work well. Feedback is welcome. Regards Marcus |
From: David <dvk...@gm...> - 2005-05-26 03:11:17
|
Marcus: Your Ocemp GUI package looks very interesting, and thank you for producing and releasing it. However, in my initial testing, some of your demos did not work for me. Here are the results I got: --------------------------- C:\Python23\Ocemp\OcempGUI-0.0.6\demo>togglebutton.py Traceback (most recent call last): File "C:\Python23\Ocemp\OcempGUI-0.0.6\demo\togglebutton.py", line 35, in= ? toggle_demo () File "C:\Python23\Ocemp\OcempGUI-0.0.6\demo\togglebutton.py", line 25, in toggle_demo b =3D ToggleButton ("Test Button") File "C:\Python23\Lib\site-packages\ocempgui\widgets\ToggleButton.py", line 48, in __init__ Button.__init__ (self, text) File "C:\Python23\Lib\site-packages\ocempgui\widgets\Button.py", line 74, in __init__ self.update () File "C:\Python23\Lib\site-packages\ocempgui\widgets\BaseWidget.py", line 235, in update self._image =3D self.draw ().convert () File "C:\Python23\Lib\site-packages\ocempgui\widgets\ToggleButton.py", line 115, in draw if self._active: AttributeError: 'ToggleButton' object has no attribute '_active' C:\Python23\Ocemp\OcempGUI-0.0.6\demo>imagebutton.py Traceback (most recent call last): File "C:\Python23\Ocemp\OcempGUI-0.0.6\demo\imagebutton.py", line 36, in = ? button_demo () File "C:\Python23\Ocemp\OcempGUI-0.0.6\demo\imagebutton.py", line 26, in button_demo b =3D ImageButton (os.getcwd () + "/image.png") File "C:\Python23\Lib\site-packages\ocempgui\widgets\ImageButton.py", line 44, in -_init__ Button.__init__ (self) File "C:\Python23\Lib\site-packages\ocempgui\widgets\Button.py", line 74, in __init__ self.update () File "C:\Python23\Lib\site-packages\ocempgui\widgets\BaseWidget.py", line 235, in update self._image =3D self.draw ().convert () File "C:\Python23\Lib\site-packages\ocempgui\widgets\ImageButton.py", line 77, in draw print "*** OcempGUI Warning: image '%s' could not be loaded!" \ AttributeError: 'ImageButton' object has no attribute '_path' C:\Python23\Ocemp\OcempGUI-0.0.6\demo> David Keeney --=20 dk...@tr... Pitcher's Duel -> pduel.sourceforge.net |
From: Marcus v. A. <ma...@sy...> - 2005-05-26 07:55:05
|
Hi, On, Thu May 26, 2005, David wrote: > Marcus: >=20 > Your Ocemp GUI package looks very interesting, and thank you for > producing and releasing it. >=20 > However, in my initial testing, some of your demos did not work for > me. Here are the results I got: [exception backtrace] right, this is a critical error based on less testing. Many constructors of the widgets call update() on creation in 0.0.6. The ToggleButton inherits from Button, which calls update() and then tries to run the ToggleButton.draw() method. A really dumb error, I've overseen. It is fixed in the current CVS version and will go into 0.0.7. If you however want to get rid of it, please go through the various widgets and encapsulate the 'self.update()' line in the __init__() methods in a try-except statement: try: self.update() except: pass Or simply use the CVS version, which seems to be pretty stable. Sorry for those circumstances. Regards Marcus |