lib/glimmer/swt/shell_proxy.rb in glimmer-dsl-swt-0.3.1 vs lib/glimmer/swt/shell_proxy.rb in glimmer-dsl-swt-0.4.0

- old
+ new

@@ -38,13 +38,14 @@ @display = DisplayProxy.instance.swt_display args = [@display] + args end args = args.compact @swt_widget = Shell.new(*args) + @swt_widget.set_data('proxy', self) @swt_widget.setLayout(FillLayout.new) @swt_widget.setMinimumSize(WIDTH_MIN, HEIGHT_MIN) - on_event_show do + on_swt_show do Thread.new do sleep(0.25) async_exec do @swt_widget.setActive unless @swt_widget.isDisposed end @@ -142,12 +143,12 @@ case property_name.to_s when 'visible?' #TODO see if you must handle non-? version and/or move elsewhere visibility_notifier = proc do observer.call(visible?) end - on_event_show(&visibility_notifier) - on_event_hide(&visibility_notifier) - on_event_close(&visibility_notifier) + on_swt_show(&visibility_notifier) + on_swt_hide(&visibility_notifier) + on_swt_close(&visibility_notifier) else super end end end