Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bind call 2 procs problem...

Status
Not open for further replies.

ee1

Programmer
May 31, 2011
25
IL
hi i am using bind to call 2 procs,
but have a problem:
i would like to exectue this two command:
1. [list Text .display %W $select]
2. clear_list

how should i write it?

bind $parent.mainframe.main <ButtonRelease-1> ....

i have tried:
bind $parent.mainframe.main <ButtonRelease-1> { clear_list ; [list Text .display %W $select]

but got an error on the select variable...

thanks!
 
Maybe you need to post more code. From the look of it, clear_list is a proc. Presumably you can call it with no arguments. Since you wrote it, you should know.

The construction of the other call is weird. The Tcl "list" command returns a list of the following arguments. In your case, that would be: {Text .display %W $select}, where $select would have the current value of "select" substituted. I have to believe that's not what you want, primarily because you don't catch the returned list value. Perhaps you meant to operate on a "listbox"? Even so, I can't figure out from what you've posted what your intentions are.

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top