The documentation for Wx :: Thread includes a small but instructive example of how to publish an event from a child stream to the main or parent window.
What I cannot understand is how it is possible to refer to a lexical variable $framein a file area from a child stream, as shown in the figure. The sequence of events is as follows: 1) start a child thread; 2) initialize $frame; 3) ... time passes ...; 4) the child thread dispatches the event to $frame.
I thought that all non-shared variables get cloned when the thread starts. How $framecan there be anything other than undefa child thread?
