|There's more than one way to do things
Option menu callbacksby dimmesdale (Friar)
|on Jul 23, 2002 at 13:17 UTC
dimmesdale has asked for the wisdom of the Perl Monks concerning the following question:
I'm having trouble creating the correct procedure for some Tk::Optionmenus. There are two of them: one represents a list of subdirectories, the other represents a list of files. When a user changes the subdirectory optionmenu I want to change the file optionmenu to reflect said change.
I'm getting some problems, however, as I said. I'm creating several of these on a NoteBook interface, and it seems that on tabs after the first, the callbacks don't function correctly if I change the file optionmenu first.
Well... actually that was yesterday. Today the code isn't even working. I've done some debugging and it seems that the callback is getting an undefined (undef) value. So I tried the Ev( ... ) construct, but it's still undefined.
Here's the code that I have for the two optionmenu's:
What should I do to get the right value into the -command sub line?