From dbb48e2601b645729a109c817467224d9a0b2b6c Mon Sep 17 00:00:00 2001 From: Jason Wells Date: Tue, 8 Aug 2023 15:13:25 -0700 Subject: [PATCH] more comments --- Examples/DynamicTableTest3.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Examples/DynamicTableTest3.rb b/Examples/DynamicTableTest3.rb index a3c016e..5e8caee 100644 --- a/Examples/DynamicTableTest3.rb +++ b/Examples/DynamicTableTest3.rb @@ -71,13 +71,18 @@ # Enable adding records dynamic_table_control.setUserCanAddRecords(true) do + # Prompt user to select a file key_file = CommonDialogs.openFileDialog("C:\\","Key File") if !key_file.nil? + # If user selected a file, addtionally prompt user to enter a password password = CommonDialogs.getInput("Password for #{key_file.getAbsolutePath}") if !password.nil? + # If user provided both, yield a new record next {key_file: key_file.getAbsolutePath, password: password} end end + + # If we reached here, yield nil abort adding a new record next nil end