Re: Odd error when closing a window.
- From: Donald Arseneau <asnd@xxxxxxxxx>
- Date: 14 Jan 2007 03:47:43 -0800
"Dave (from the UK)" <see-my-signature@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:
below. Closing the Window works fine, but if I hit the download button first,... blah blah blah ... nothing relevant
then try to hit Cancel, it generates an error.
proc ::tools::twic {} {
proc ::tools::twic::download {} {
# There are no buttons in this procedure.
}
Ha ha, hiding anything that is relevant to the problem.
But if I
1) Hit the 'dwonload' button then
2) Hit the cancel button,
I get this:
invalid command name ".twicWin.tf.txt"
invalid command name ".twicWin.tf.txt"
while executing
".twicWin.tf.txt insert end "$ZIPFILE ( $ZIPFILESIZE b )\n""
Of course the good proc to show is what contains this command.
I presume it is the download proc that keeps chugging along,
even while you click the cancel button.
You need to put a test in there, allowing the cancel button to
actually cancel the procedure. You could have some global variable \
as a flag, but it makes sense to just look for the gui widgets,
like
if { ![winfo exists .twicWin.tf.txt] } {
# cancelled or closed. Abort what we were doing and disappear.
}
--
Donald Arseneau asnd@xxxxxxxxx
.
- Follow-Ups:
- Re: Odd error when closing a window.
- From: Dave (from the UK)
- Re: Odd error when closing a window.
- From: Dave (from the UK)
- Re: Odd error when closing a window.
- References:
- Odd error when closing a window.
- From: Dave (from the UK)
- Odd error when closing a window.
- Prev by Date: Re: Dropdown list in a popup window
- Next by Date: Examples of using Donal Fellows' Combobox?
- Previous by thread: Re: Odd error when closing a window.
- Next by thread: Re: Odd error when closing a window.
- Index(es):