Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#11 Problem with Pmw 1.1, and Tcl/Tk 8.4.2...

closed-out-of-date
nobody
None
5
2010-02-24
2003-03-25
Jayce Piel
No

Hi,
I have a problem using Pmw on all platforms where
Python2.2.2/Tkinter was built using Tcl/Tk 8.4.2.
When launching the Pmw/Pmw_1_1/demos/All.py test
package, I have the Error log window that shows :
Error: 1
ValueError Exception in Tk callback
Function: <bound method PanedWidget._handleConfigure
of <_Pmw.Pmw_1_1.lib.PmwPanedWidget.PanedWidget
instance at 0x2fd528>> (type: <type 'instance method'>)
Args: ('193', '??', '??', '504', '??', '??', '??',
'800', '0', '0', '??', '0', '??', '??',
'.3203496.3129224', '22', '??', '??', '??')
Traceback (innermost last):
File "/home/jspiel/Pmw/Pmw_1_1/lib/PmwBase.py", line
1713, in __call__
args = apply(self.subst, args)
File "/usr/local/lib/python2.2/lib-tk/Tkinter.py",
line 1032, in _substitute
e.num = getint(b)
ValueError: invalid literal for int(): ??

On a platform where Python2.2.2/Tkinter where built
using Tcl/Tk 8.0.5, the problem doesn't appears.
Is this a bug in Tk, in Tkinter or in Pmw ?

Discussion

  • Jeremy Moore
    Jeremy Moore
    2003-03-28

    Logged In: YES
    user_id=744000

    See bug 698517 on the Python page. Basically, its a change
    in Tcl/Tk behavior (bug 612110 for Tcl/Tk). A patch exists for
    Tkinter.py in the patches section; however, it does not help
    those of us using pmw, as pmw code is now passed the
    invalid value.

     
  • John Speno
    John Speno
    2003-03-30

    Logged In: YES
    user_id=2138

    I'm using Python2.3a2, Tcl/Tk 8.4.2 and Pmw 1.1

    When I fixed my local Tkinter.py, when the event passed in '??', I just did a pass, so that field won't be set in the python event instance.

    AFAIK, this hasn't broken anything in my Pmw based app. Maybe you could try that, jmoore_calaway?

    Then again, maybe I'm just not using anything that will break, though I'm using a lot of Pmw here.

    Let me know if you are using ComboBoxes. I have issues with them...

    Thanks.

     
  • Logged In: YES
    user_id=326125

    I have a fix for the Pmw problem:

    1) patch your Tkinter.py (see bug 698517)
    2) go to your Pmw directory, search and replace all
    string.atoi with int and all string.float with float

    some of the Pmw tests will now fail (the asserts in the
    tests need to be rewritten by the Pmw folks since the cget
    method in Tkinter wil now not anymore always return strings
    but objects) yet all the widgets will work now.

    Something else:
    if in one of your programs you test for mouse button events
    (which button was pressed) by using event.keycode - change
    that to event.num since the keycode will now hold those '??'
    but num will hold the mouse button number which is what you
    wanted in the first place

    Using Python2.3b Tcl/Tk 8.4.2, Pwm_1_1, tested on SGI
    IRIX646 and SUN OS5

    I hope this helps!

     
  • Logged In: YES
    user_id=326125

    I have a fix for the Pmw problem:

    1) patch your Tkinter.py (see bug 698517)
    2) go to your Pmw directory, search and replace all
    string.atoi with int and all string.float with float

    some of the Pmw tests will now fail (the asserts in the
    tests need to be rewritten by the Pmw folks since the cget
    method in Tkinter wil now not anymore always return strings
    but objects) yet all the widgets will work now.

    Something else:
    if in one of your programs you test for mouse button events
    (which button was pressed) by using event.keycode - change
    that to event.num since the keycode will now hold those '??'
    but num will hold the mouse button number which is what you
    wanted in the first place

    Using Python2.3b Tcl/Tk 8.4.2, Pwm_1_1, tested on SGI
    IRIX646 and SUN OS5

    I hope this helps!

     
    • status: open --> closed-out-of-date