VZ> But what will they do with the event once they get it? They'd need
to know its concrete type to retrieve the information from it and this
depends on the event type.
The scripting language is lua, so it isn't strongly typed.
In the event function, my idea is to use typeid to get the actual type
of the event and pass a correctly stuffed reference on the script side.
VZ> Yes, Bind() requires using the callback type compatible with the
event type and checks for it at compile-time. This can't be done if the
event type is specified during run-time.
OK, that's what I thought, thank you for confirming it
VZ> The simplest is to override ProcessEvent() and dispatch your events
yourself from there, bypassing wx event entirely.
Well... it looks complicated if I need to completely bypass everything.
Sad that there is nothing simpler.
I just wanted to reuse what already exists.
In this case it's just simpler to make as many functions as there are
different event types to handle.
Igor> Imagine a situation where you have an "arbitrary" event of list
item selection. And you want to bind it to the button?
Anyway it won't work in this case, since the list will obviously never
generate a button event.
But the scripters are normally not stupid. They can still perfectly do
Thank you for your answers.