From d48e38fe7e34ac865f5a34339cc37f033430632a Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sun, 16 Oct 2022 18:45:58 -0400 Subject: [PATCH] examples/hello: Also test password text input --- examples/hello/app/windows/lvguitesting.rb | 24 +++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/examples/hello/app/windows/lvguitesting.rb b/examples/hello/app/windows/lvguitesting.rb index da464199..c24960ac 100644 --- a/examples/hello/app/windows/lvguitesting.rb +++ b/examples/hello/app/windows/lvguitesting.rb @@ -15,16 +15,30 @@ module GUI add_main_text(%Q{\nThe description label here will mirror the switch's value.\n}) add_textarea().tap do |ta| - on_click = ->() do + on_click = ->() do puts "clicked" - end - ta.on_submit = ->(value) do + end + ta.on_submit = ->(value) do puts "submitted #{value.inspect}" puts " -> get_text: #{ta.get_text().inspect}" - end + end ta.on_modified = ->(value) do puts "modified #{value.inspect}" - end + end + end + + add_textarea().tap do |ta| + ta.set_pwd_mode(true) + on_click = ->() do + puts "clicked" + end + ta.on_submit = ->(value) do + puts "submitted #{value.inspect}" + puts " -> get_text: #{ta.get_text().inspect}" + end + ta.on_modified = ->(value) do + puts "modified #{value.inspect}" + end end # Add a toggle switch