class

Tryst::CallbackSignal

Inherits Reference < Object

Passed as the second block argument to #register_callback/#bind so a callback can tell Tk to stop running any other bindings for the same event (e.g. to override a widget's default key handling), without forcing every ordinary callback to return or raise a special value to opt in. A callback that doesn't need this can just ignore the argument - Crystal blocks may declare fewer parameters than they're given.

Ruby-tryst's App#register_callback also supports throw :tryst_continue/ :tryst_return (catch/throw, ext/tryst/tcltkbridge.c), mapping to TCL_CONTINUE/TCL_RETURN. Deliberately not ported: per Tk's own bind(n) docs, a script that signals TCL_CONTINUE has its remaining bindtags run "exactly as if it had returned normally" - no effect distinct from just finishing - and TCL_RETURN has no propagation effect either, it's "safe to signal in any context" plumbing rather than a behavior an app would deliberately reach for. Only break (TCL_BREAK) has a real, demonstrable effect. Revisit if a real use case for the other two turns up. A class on purpose: #break! is mutated by the callback and read by dispatch_callback on that same instance. A struct would silently fail.

Instance methods

break!
Source
break?
Source