The transfer_form.rb script is the version that opens a frame, as a standalone application.
When you start the script you get, the apply and restore button are disabled:
Say, we change the amount and the to account
Now, the apply and restore buttons are enabled, as you changed the data.
Click on the apply button, you store the data and the two buttons are disabled again.
When you close the application, it shows a summary of the transfer. The symmary uses the account object's values.
The code is
78 transfer_form = form do 79 80 title "Transfer Form" 81 82 width 400 83 84 content do 85 data current 86 input "Date", Time.now 87 section 88 input "Amount", :amount 89 next_row 90 section "From" 91 combo "Account", my_accounts, current.account_from 92 input "Name", :account_from / :owner 93 input "Address", :account_from / :address 94 section "To" 95 input "Account", :account_to / :number 96 input "Name", :account_to / :owner 97 input "Address", :account_to / :address 98 next_row 99 command :apply, :restore 100 end 101 102 on_close do 103 message_box(current.summary) 104 end 105 106 end 107
The important things are: