Overview
| Artifact ID: | 7a08e0316990eee94955c6ffd17c836d45d515c3 |
|---|---|
| Ticket: | 1499394fffffffffffffffffffffffffffffffff
TIP 285: Script Cancellation with Tcl_CancelEval |
| User & Date: | mistachkin on 2006-06-13 16:01:05 |
Changes
- icomment:
File Added - 181487: script_cancellation_5.zip Logged In: YES user_id=113501 Updated (v5) patch supports a custom error message for script cancellation via Tcl_CancelEval and [cancel]. Also corrected mutex locking issue with CancelEvalProc. Here is a quick Tk example of [cancel] usage: ---------------------------------------------------- package require Tk pack [text .clock] -side top -expand true \ -fill both -padx 10 -pady 10 pack [button .go -padx 10 -pady 10 -text "Go" \ -command [list goButton]] \ -side left -padx 10 -pady 10 pack [button .cancel -padx 10 -pady 10 -text "Cancel" \ -command [list cancelButton "clock stopped."]] \ -side right -padx 10 -pady 10 proc goButton {args} { while {1} { catch {.clock delete 1.0 end} .clock insert end [clock format [clock seconds]] update } } proc cancelButton {msg} { cancel -unwind {} $msg } - login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"