search for: add_pending_event

Displaying 2 results from an estimated 2 matches for "add_pending_event".

2007 Jul 27
0
[ wxruby-Bugs-12610 ] Possible crash with EvtHandler.add_pending_evemt and custom event class
...riority: 2 Submitted By: Alex Fenton (brokentoy) Assigned to: Alex Fenton (brokentoy) Summary: Possible crash with EvtHandler.add_pending_evemt and custom event class Initial Comment: If a custom event sets associated client_data using set_client_data, and then the event is queued using EvtHandler#add_pending_event the client_data may be prematurely deleted if GC runs before the event is actually processed. Temporary workaround is to send the event for immediate processing via process_event. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforg...
2006 Dec 18
13
unit testing wxruby GUIs
...e only real advantage I can see is being able to record actions. 2) I think a better way would be to use the wxRuby API to simulate events directly. Event objects are instantiable like any other, and they can then be passed to the app objects for handling by using EvtHandler#process_event or #add_pending_event. A snippet that works for me (OS X, 0.0.38) f = Wx::Frame.new(nil, -1, ''test_app'') b = Wx::Button.new(f, -1, ''click'') evt_button(b.get_id) { | e | Kernel.raise ''I was clicked'' } # I got this 10003 id by calling get_event_type...