Hello there!
I've written a very simple Tk application that is very serial.
Recently I added support for http requests like this:
set token [::http::geturl example.com]
set data [::http::data $token]
(configure .toplevel.mywidget with $data)
I soon discovered that ::http::geturl doesn't block the main loop,
which is great, but it happens that for my very serial application,
it can be problematic sometimes. For instance: sometimes I destroy
the toplevel in which mywidget lives before it got a chance to
receive $data, so when geturl resumes its execution, my code throws
an error because it tries to configure mywidget.
[...]
Alternatively, is there a more elegant solution that is not to add a
bunch of if's to check if widgets still exist?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 493 |
Nodes: | 16 (2 / 14) |
Uptime: | 183:18:13 |
Calls: | 9,705 |
Files: | 13,737 |
Messages: | 6,179,547 |