The two methods ask_load_file and ask_save_file provide an easy interface for selecting filenames to load from and save to. The following example creates a simple text editor with these dialogs, two buttons and an edit_box.
Shoes.app :width => 300 do
flow do
button "Load", :width => '50%' do
file = ask_open_file
@edit.text = File.read(file)
end
button "Save", :width => '50%' do
file = ask_save_file
File.open(file, "w+") do|f|
f.write @edit.text
end
end
end
@edit = edit_box :width => '100%',
:height => 500
end


