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

#1 Fixes for Pmw1.1

open
nobody
None
5
2002-11-27
2002-11-27
Greg McFarlane
No

In version 1.1 of Pmw it is now illegal to create a
component if a component of the same name already
exists. This causes a couple of problems in
PmwContribD. The simple patches below fix them.

*** MCScrolledListBox.py.orig Mon Nov 25 23:03:54 2002
--- MCScrolledListBox.py Mon Nov 25 23:04:07 2002
***************
*** 129,135 ****
fill=X,
)
sb = self.createcomponent(
! 'vertscrollbar',
(), None,
Scrollbar,
(sbf,),
--- 129,135 ----
fill=X,
)
sb = self.createcomponent(
! 'mcvertscrollbar',
(), None,
Scrollbar,
(sbf,),
***************
*** 195,201 ****
def _yset(self, *args):
"Fixup method for scrollbar handling."
#print '_yset', args
! apply(self.component('vertscrollbar').set, args)
for lb in self.lists:
lb.yview_moveto(args[0])
return
--- 195,201 ----
def _yset(self, *args):
"Fixup method for scrollbar handling."
#print '_yset', args
! apply(self.component('mcvertscrollbar').set,
args)
for lb in self.lists:
lb.yview_moveto(args[0])
return

*** OptionColorButton.py.orig Mon Nov 25 23:05:40 2002
--- OptionColorButton.py Mon Nov 25 23:30:53 2002
***************
*** 82,105 ****
optiondefs = (
('variable', None, Pmw.INITOPT),
('command', None, Pmw.INITOPT),
)
self.internal_variable = StringVar()
self.internal_variable.trace('w',
self.variable_trace)
self.defineoptions(kw, optiondefs)
Pmw.LabeledWidget.__init__(self, parent=parent)
interior = self.interior()
- l = self.createcomponent(
- 'label',
- (), None,
- Label,
- (interior,),
- text=' ',
- relief='raised',
- )
- l.pack(
- side=LEFT,
- fill=X,
- )
w = self.createcomponent(
'button',
(), None,
--- 82,94 ----
optiondefs = (
('variable', None, Pmw.INITOPT),
('command', None, Pmw.INITOPT),
+ ('label_relief', 'raised', None),
)
self.internal_variable = StringVar()
self.internal_variable.trace('w',
self.variable_trace)
self.defineoptions(kw, optiondefs)
Pmw.LabeledWidget.__init__(self, parent=parent)
interior = self.interior()
w = self.createcomponent(
'button',
(), None,

Discussion