Sha256: e9806446d24fbaecc02670f1e73cf0e5c72f0dadafc65d3e0a24bf69167981d8

Contents?: true

Size: 617 Bytes

Versions: 6

Compression:

Stored size: 617 Bytes

Contents

Shoes.app width: 300, height: 200 do
   flow do
      switch font: "monospace Italic 10", stroke: red; para
   end
   
   flow do
      @n = switch(active: true) do
         @p.text = (@n.active? ? "true": "false") unless @p.nil?
      end
      @p = para
   end
   
   flow do
      @m = switch width: 80
      @m.click do
        #$stderr.puts "Click"
        @m.active? ? @e.start : @e.stop
      end
      @e = every(1) { |count| @q.text = count unless @q.nil? & @m.active? }
      @q = para ""
   end
   
   start do
      @e.stop
      @p.text = @n.active? ? "true" : "false"
      @m.active = false
   end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
scarpe-0.4.0 examples/legacy/not_checked/shoes3-tests/switch/switch.rb
scarpe-0.3.0 examples/legacy/not_checked/shoes3-tests/switch/switch.rb
scarpe-0.2.2 examples/legacy/not_checked/shoes3-tests/switch/switch.rb
lacci-0.2.1 examples/legacy/not_checked/shoes3-tests/switch/switch.rb
scarpe-0.2.1 examples/legacy/not_checked/shoes3-tests/switch/switch.rb
scarpe-0.2.0 examples/legacy/not_checked/shoes3-tests/switch/switch.rb