Thanks Frederik. I knew it was not binding the way I intended to, but
just had no idea why or how to make it do so... thanks for the quick
lambda lesson :-)
--
http://mail.python.org/mailman/listinfo/python-list
"Harlin" <[EMAIL PROTECTED]> wrote
>I have an array of Appnames. Let's say they are 'Monkeys', 'Cats',
> 'Birds'.
>
> I would like create a button array with these:
>
> ---Start Code---
> # Constructing and displaying buttons
> for a in Appnames:
> Button(root, text=a, command=lambda:self.OpenFi
I have an array of Appnames. Let's say they are 'Monkeys', 'Cats',
'Birds'.
I would like create a button array with these:
---Start Code---
# Constructing and displaying buttons
for a in Appnames:
Button(root, text=a, command=lambda:self.OpenFile(a)).pack()
# Somewhere else I have this functi