lib/glimmer/libui/button_column_proxy.rb in glimmer-dsl-libui-0.1.0 vs lib/glimmer/libui/button_column_proxy.rb in glimmer-dsl-libui-0.1.1
- old
+ new
@@ -33,10 +33,15 @@
include EnableableColumn
def on_clicked(&block)
# TODO consider generalizing into custom listeners and moving to ControlProxy
@on_clicked_procs ||= []
- @on_clicked_procs << block
+ if block.nil?
+ @on_clicked_procs
+ else
+ @on_clicked_procs << block
+ block
+ end
end
def can_handle_listener?(listener_name)
listener_name == 'on_clicked' || super
end