1. Computing

Are You Sure You Want to Exit? and Other Dialog Methods

By

1 of 5

Alert
Are You Sure You Want to Exit? and Other Dialog Methods

We've all had to respond to that ubiquitous question: Are You Sure You Want to Exit? Ever wondered what was behind creating them? Shoes gives you a total of 5 different dialog methods for displaying messages, asking questions, getting colors and filenames. Using these, like everything else in Shoes, is just a method call away.

The most basic of the Shoes dialog methods is alert. It's similar to Javascript's alert method.

Shoes.app :width => 100, :height => 40 do
  button "Click me" do
    alert "This is a message box"
  end
end
  1. About.com
  2. Computing
  3. Ruby
  4. Graphical User Interfaces
  5. Shoes
  6. Are You Sure You Want to Exit? and Other Dialog Methods

©2014 About.com. All rights reserved.