-
Notifications
You must be signed in to change notification settings - Fork 0
/
shoe_test.rb
33 lines (31 loc) · 996 Bytes
/
shoe_test.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Shoes.app do
@first_list = ['Frances Johnson', 'Ignatius J. Reilly',
'Winston Niles Rumfoord']
@slot = stack { para "Choose a dude"}
@slot.append do
list_box :items => @first_list,
:width => 220,
:choose => @first_list[0] do |my_list|
@dude.text = my_list.text
end
end
@slot.append do
@dude = para "No dude selected"
end
para "fubar, fubar, fubar"
@check_list = Array.new(@first_list)
stack do
background "rgb(0, 191, 255, 100)".."rgb(255, 255, 255, 0)"
para "fubar"
para "fubar"
para "fubar"
@check_list.map! do |name|
flow { @c = check; para name }
[@c, name]
end
button "What's been checked?" do
selected = @check_list.map { |c, name| name if c.checked? }.compact
alert("You selected: " + selected.join(', '))
end
end
end