Fixed with:
def obOpMenu(self):
self.oblist = self.canvas.find_withtag('object')
self.list = []
for item in self.oblist:
self.itemname = self.canvas.gettags(item)
if self.itemname[1] != 'default
>
> Singled out the two lines for clarity:
>> 12: self.objectsvars =
>> 'menuitemhere','menuitemhere','menuitemhere','menuitemhere'
>> 17: self.optionmenu =
>> OptionMenu(self.frame,self.var,self.objectsvars)
>
>
> Because in the first case, you're passing 3 items to OptionMen
> This is a more precise question, the above was after trying different methods,
> and it got a little confusing.
>
> Why in the below does using in line 12:self.objectsvars =
> 'menuitemhere','menuitemhere','menuitemhere','menuitemhere', not work,
> but placing 'menuitemhere','menuitemhere','menu
This is a more precise question, the above was after trying different methods,
and it got a little confusing.
Why in the below does using in line 12:self.objectsvars =
'menuitemhere','menuitemhere','menuitemhere','menuitemhere', not work,
but placing 'menuitemhere','menuitemhere','menuitemhere','m
Apologies, forgot to add I'm using 2.6.4 on ubuntu 9.10
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Hey Buddy Pals,
In the below *function*(if you can call it that yet:)
I'm trying to do the following:
interpolate this string:
'OptionMenu(self.frame,self.var,'%s','%s')'
with this list turned into variables:
['default1', 'default2']
which would become:
self.default1 = 'default1'
self.defa