Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 28 |
Nodes: | 6 (1 / 5) |
Uptime: | 45:47:16 |
Calls: | 422 |
Calls today: | 1 |
Files: | 1,024 |
Messages: | 90,336 |
As unlikely as that is, I ask of you: what is the wise, serious,
professional way of handling that situation and making sure that
worse things won't happen at sea?
OK, how about this:
bind $::SRw <Return> {set ::PINPUT "$pname::::::::::::::::$pfile"}
Rich suggested making it a list. You can do that or make ::PINPUT an array:
set ::PINPUT(state) waiting
bind $::SRw <Return> {
set ::PINPUT(pname) $pname
set ::PINPUT(pname) $pfile
set ::PINPUT(state) done
}
then:
vwait ::PINPUT(state)
catch {destroy $::SRw}
return [array get ::PINPUT]
Where you go to use it, do:
array set resultArray $returnValue
Or use the dict command to access the pieces.
On Fri, 20 Dec 2024 23:13:44 -0600, Gerald Lester wrote:
Rich suggested making it a list. You can do that or make ::PINPUT an array: >>**************************
set ::PINPUT(state) waiting
bind $::SRw <Return> {
set ::PINPUT(pname) $pname
set ::PINPUT(pname) $pfile
set ::PINPUT(state) done
}
then:
vwait ::PINPUT(state)
catch {destroy $::SRw}
return [array get ::PINPUT]
Where you go to use it, do:
array set resultArray $returnValue
Or use the dict command to access the pieces.
It's good to know that I was even wronger than I thought.
I have been using a list as Rich suggested, but the use of an array
is very interesting, rather Tcl-ish.