[[Explain virtual events. Is there a tutorial? Illustrate usage. Put forward references in appropriate places--what are those? "advanced Tk-ing?"]] [[Important thread: http://groups.google.com/groups?th=5f799aadcb2caf35 ]] ---- [Bryan Oakley]'s wizard mega- (meta?) widget taught me a ''wonderful'' use of virtual events. Whereas I had code in my wizard implementation like: proc doNextThing { args } { ... } button $w.next -text "Next" -command doNextThing Bryan had the foresight indirect the button handling via virtual events. Now I do something like: proc doNextThing { args } { } proc dispatch { event } { switch -- $event { <> { doNextThing } ... } } ... button $w.next -text "Next" \ -command [list event generate $w <>] bind $w <> [list dispatch <>] The wonder of this is that my testing harness can do: bind $w <> {+doTestingThing} and trap the button presses without making invasive changes to the wizard code! --[Chris Nelson]