I have some problem making a custom event.
It seem like the initilizer is not visible
in the scope. Why is that?
I have put a little test program in an attachment,
can anybody tell me, what is wrong with it?
I have some problem making a custom event.
It seem like the initilizer is not visible
in the scope. Why is that?
I have put a little test program in an attachment,
can anybody tell me, what is wrong with it?
On 05/07/2010 15:57, Svend Haugaard Sørensen wrote:
I have some problem making a custom event.
It seem like the initilizer is not visible
in the scope. Why is that?
For some reason the allocator (constructor) function for Wx::Event is
undefined - I’ve just checked the sources and I don’t know why SWIG is
doing that. It may be a regression.
Can you inherit from Wx::CommandEvent or some other Event class instead.
You are calling super with the parameters for Wx::CE anyway. That works
fine for me (as per the sample).
PS - at line 21 you call Wx::EvtHandler.process_event. #process_event is
an instance method, not a class method. Every Window, plus the App, has
an event_handler (with an accessor). You pass the event to one of those,
normally the one where the event originates so that it can bubble
upwards.
hth
alex
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs