samples/hello/hello_link.rb in glimmer-dsl-swt-4.22.2.4 vs samples/hello/hello_link.rb in glimmer-dsl-swt-4.22.2.5
- old
+ new
@@ -45,15 +45,16 @@
How do you know <a href="which-link-href-value">which link</a> you clicked?
Just keep clicking <a href="all links">links</a> to find out!
MULTI_LINE_STRING
- on_widget_selected { |selection_event|
+ on_widget_selected do |selection_event|
# This retrieves the clicked link href (or contained text if no href is set)
@selected_link = selection_event.text
- }
- on_mouse_up { |mouse_event|
+ end
+
+ on_mouse_up do |mouse_event|
unless @selected_link.nil?
@help_shell.close unless @help_shell.nil? || @help_shell.disposed?
@help_shell = shell(:no_trim) {
grid_layout {
margin_width 10
@@ -77,10 +78,10 @@
@help_shell.close
}
}
@help_shell.open
end
- }
+ end
}
}
}
end