> I have been playing with creating GUIs on the fly with wxPerl and
> installing events with dynamic Perl code. for example, I might take the
> scalar '{ print "hello world\n" }', eval it into an anonymous subroutine
> and install it as an event handler for a button using EVT_BUTTON().
>
> however, what I have found is that if you destroy that window, re-create
> another window (with the same ID) and install a different anonymous
> subroutine, say '{ print "hello again\n" }', the event still triggers
> "hello world" to be printed.
>
> any thoughts on why this might be happening and/or a work-around?
This is bizarre ( given how events are implemented in wxWindows ).
I'll try to reproduce the behaviour, but as usual a samll modification
to the minimal ( or another ) sample is welcome.
Regards
Mattia
|