Sha256: db4c419076e6d29de45ea9eb259b6c7a3594ffa5c9705f62c31f481f81a8c28b

Contents?: true

Size: 603 Bytes

Versions: 6

Compression:

Stored size: 603 Bytes

Contents

#
# From the original Shoes announcement: "Okay, well... Shoes"
# http://github.com/shoes/shoes/wiki/%E2%80%9COkay,-Well...-Shoes%E2%80%9D
# 
#   had to change "text" to "para" to match shoes 3 api
#
label, time = nil, Time.now
Shoes.app :height => 150, :width => 250 do
  background "rgb(240, 250, 208)"
  stack :margin => 10 do
    start = button "Start" do
      time = Time.now
      label.replace "Stop watch started at #{time}"
    end
    stop = button "Stop" do
      label.replace "Stopped, #{Time.now - time} seconds elapsed."
    end
    label = para "Press start to begin timing."
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
scarpe-0.4.0 examples/legacy/working/shoes-contrib/basic/intro.rb
scarpe-0.3.0 examples/legacy/working/shoes-contrib/basic/intro.rb
scarpe-0.2.2 examples/legacy/working/shoes-contrib/basic/intro.rb
lacci-0.2.1 examples/legacy/working/shoes-contrib/basic/intro.rb
scarpe-0.2.1 examples/legacy/working/shoes-contrib/basic/intro.rb
scarpe-0.2.0 examples/legacy/working/shoes-contrib/basic/intro.rb