Skip to content

Commit

Permalink
more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JuicyDragon committed Aug 8, 2023
1 parent 06eb9db commit dbb48e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Examples/DynamicTableTest3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit dbb48e2

Please sign in to comment.