Teek API Documentation

An event a node wants wired up. target is nil to bind on the node’s own widget, or a Symbol naming another node’s widget - resolved by the realizer’s link pass, after every node in the whole tree has already been created, so a target declared later in the build still resolves correctly (the forward-reference case). subs are Teek::App#bind substitution codes (e.g. %i[x y]) forwarded to the handler when it fires.

Inherits: Data

Instance Methods

initialize(event:, handler:, target: nil, subs: [])

Parameters
  • event String — a Tk bind event pattern, e.g. "<Button-1>"
  • handler #call — called with whatever subs substitutes
  • target Symbol, nil — another node's name, or nil for self
  • subs Array<Symbol, String> — see Teek::App#bind

Returns EventBinding — a new instance of EventBinding

Attributes

event [R]

Returns the value of attribute event

Returns Object — the current value of event

handler [R]

Returns the value of attribute handler

Returns Object — the current value of handler

subs [R]

Returns the value of attribute subs

Returns Object — the current value of subs

target [R]

Returns the value of attribute target

Returns Object — the current value of target