Hi,
I have written small TCL script. One of the procedure is used to invoke TK window and another procedure use keylist. And so I have used "package require Tk" and "package require Tclx" on my main TCL script. I'm facing an issue in using above packages.
1. If I use the Tclx package then Tk procedure is not working, it doesn't show the message in Tk window.
2. If I don't use Tclx package, tk window shows the message but the other procedure which uses keylist is not working.
Here is my script,
#!/usr/bin/wish
package require Tcl
package require Tk
package require Tclx
package require Expect
set env(tag_dir) "/opt"
source [file join $env(tag_dir) local lib controllerAp.lib]
source [file join $env(tag_dir) local lib contr_cli_cmd.lib]
proc tk_CCX_DevConfig {txt} {
label .l1 -text $txt
button .b1 -text "Ok" -command "destroy ."
grid .l1 -row 2
grid .b1 -row 4 -column 0
}
...
...
# Call the above TK procedure
if [catch {tk_CCX_DevConfig "Plz configure Dev"} err] {
puts "Error in invoking Input Gui"
}
puts "User configuration is completed"
# Call another procedure that uses keylist
if [catch {devConnect "192.168.100.1"} err] {
puts "Error in connecting device which use keylist"
}
....
....
Any suggestions ?
- Kanna
I have written small TCL script. One of the procedure is used to invoke TK window and another procedure use keylist. And so I have used "package require Tk" and "package require Tclx" on my main TCL script. I'm facing an issue in using above packages.
1. If I use the Tclx package then Tk procedure is not working, it doesn't show the message in Tk window.
2. If I don't use Tclx package, tk window shows the message but the other procedure which uses keylist is not working.
Here is my script,
#!/usr/bin/wish
package require Tcl
package require Tk
package require Tclx
package require Expect
set env(tag_dir) "/opt"
source [file join $env(tag_dir) local lib controllerAp.lib]
source [file join $env(tag_dir) local lib contr_cli_cmd.lib]
proc tk_CCX_DevConfig {txt} {
label .l1 -text $txt
button .b1 -text "Ok" -command "destroy ."
grid .l1 -row 2
grid .b1 -row 4 -column 0
}
...
...
# Call the above TK procedure
if [catch {tk_CCX_DevConfig "Plz configure Dev"} err] {
puts "Error in invoking Input Gui"
}
puts "User configuration is completed"
# Call another procedure that uses keylist
if [catch {devConnect "192.168.100.1"} err] {
puts "Error in connecting device which use keylist"
}
....
....
Any suggestions ?
- Kanna