Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 155 lines (102 sloc) 3.899 kb
fe86a81 @ashbb first commit
authored
1 Trivia
2 ------
3
720369f @ashbb added '\\' in front of '_' for github spec change or bug.
authored
4 list\_box needs to set :height explicitly
fe86a81 @ashbb first commit
authored
5 ----------------------------------------
6
7 # sample91.rb
8 Shoes.app :width => 300, :height => 60 do
9 button('OK'){@msg.text = @e.text}
10 @e = list_box :items => ['blue', 'red', 'yellow'], :height => 30
11 @msg = para ''
12 end
13
14 **sample91.png**
15
2f0c4ac @ashbb deleted patches
authored
16 ![sample91.png](http://github.com/ashbb/shoes_tutorial_html/raw/master/images/sample91.png)
fe86a81 @ashbb first commit
authored
17
18 Try to comment out :height => 30 and run. <br>
720369f @ashbb added '\\' in front of '_' for github spec change or bug.
authored
19 The list\_box doesn't show the items. <br>
6e57531 @ashbb totally corrected and add the acknowledgment.
authored
20 This strange behavior occurs only on Windows. On Mac OS X, it doesn't. <br>
fe86a81 @ashbb first commit
authored
21
22 This OS X information was provided by George Thompson. <br>
23
24
6e57531 @ashbb totally corrected and add the acknowledgment.
authored
25 strange mouse event behavior
fe86a81 @ashbb first commit
authored
26 --------------------------------
27
28 # sample92.rb
29 Shoes.app :width => 150, :height => 100 do
30 @msg = para ''
31 nostroke
32
33 @img = image :width => 20, :height => 20, :left => 30, :top => 30 do
34 oval :radius => 10, :fill => red
35 end
36 @img.hover{ @msg.replace 'hello' }
37 @img.leave{ @msg.replace '' }
38
39 @o = oval :left => 60, :top => 60, :radius => 10, :fill => blue
40 @o.hover{ @msg.replace 'hi' }
41 @o.leave{ @msg.replace '' }
42 end
43
44 **sample92.png**
45
2f0c4ac @ashbb deleted patches
authored
46 ![sample92.png](http://github.com/ashbb/shoes_tutorial_html/raw/master/images/sample92.png)
fe86a81 @ashbb first commit
authored
47
48 The image (red) oval works the mouse hovering feature but the blue doesn't. <br>
6e57531 @ashbb totally corrected and add the acknowledgment.
authored
49 This behavior is a bug. But it is fixed in the latest Shoes-0.r970 and later. <br>
fe86a81 @ashbb first commit
authored
50
51
52 Shoes Fest
53 ----------
54
55 [http://shoes.yapok.org/](http://shoes.yapok.org/)
56
57
58 Shoes was born July 31st, 2007.
59 -------------------------------
60
6e57531 @ashbb totally corrected and add the acknowledgment.
authored
61 Yes, July 31st is Shoes' birthday and it is now one year old.
fe86a81 @ashbb first commit
authored
62
63
64 Shoes wiki
65 ----------
66
6e57531 @ashbb totally corrected and add the acknowledgment.
authored
67 A new Shoes wiki was launched on Sep 12th, 2008. <br>
fe86a81 @ashbb first commit
authored
68 <http://github.com/why/shoes/wikis> <br>
6e57531 @ashbb totally corrected and add the acknowledgment.
authored
69 The old one was retired. Now linked to the Shoes Official Homepage. <br>
fe86a81 @ashbb first commit
authored
70 <http://code.whytheluckystiff.net/shoes/> <br>
71 <http://shoooes.net/> <br>
72
73
74 Built-in sample apps
75 --------------------
76
6e57531 @ashbb totally corrected and add the acknowledgment.
authored
77 See the following directory (in Windows XP with Shoes-0.r1057) <br>
fe86a81 @ashbb first commit
authored
78 There are many sample code. Let's hack! <br>
79
6e57531 @ashbb totally corrected and add the acknowledgment.
authored
80 C:\Program Files\Common Files\Shoes\0.r1057\samples <br>
fe86a81 @ashbb first commit
authored
81
82
83 Building Shoes
84 --------------
85
86 If you have to build Shoes by yourself, this information might be useful. <br>
87 <http://github.com/why/shoes/wikis/buildingshoes>
88
89
90 The Rules Of Shoes and UTF-8 Everywhere
91 ---------------------------------------
92
6e57531 @ashbb totally corrected and add the acknowledgment.
authored
93 Shoes scope can be a bit confusing... <br>
fe86a81 @ashbb first commit
authored
94 Shoes supports UTF-8 everywhere. Can't wait to get the next build. <br>
95 <http://newwws.shoooes.net/2008/09/22/the-rules-of-shoes.html>
96
97
98 A very decent intro to shoes for beginners
99 ------------------------------------------
100 <http://ruby.about.com/od/shoes/Shoes.htm>
101
102
103 Lovely creatures
104 ----------------
105
6e57531 @ashbb totally corrected and add the acknowledgment.
authored
106 Lovely creatures in this tutorial were created by Anita Kuno. <br>
fe86a81 @ashbb first commit
authored
107 Each creature has his/her own name. <br>
108 purple is loogink <br>
109 green is Cy <br>
110 brown is Yar <br>
111 blue is kamome <br>
112 white is shaha <br>
113
114 # sample93.rb
115 Shoes.app :width => 400, :height => 75, :title => 'Lovely Creaturs' do
116 background "#D0A".."#F90", :angle => 90
117 x = 0
118 creatures = %w(loogink yar cy kamome shaha).collect{|c| image "../images/#{c}.png", :left => x += 60}
119
120 messages =<<-EOS
121 Thx for reading. :)
122 See you!
123 Enjoy Ruby and Shoes!
124 EOS
08c7455 @ashbb Finished confirming all 132 sample codes! :-D
authored
125 messages = messages.split("\n")
fe86a81 @ashbb first commit
authored
126
127 msg = subtitle '', :top => 30, :stroke => white
128 animate(3) do
129 creatures.each{|c| c.move c.left, rand(15)}
130 end
131
132 creatures.each do |c|
133 c.hover{msg.text = strong messages[rand(messages.length)]}
134 c.leave{msg.text = ''}
135 end
136 end
137
08c7455 @ashbb Finished confirming all 132 sample codes! :-D
authored
138
fe86a81 @ashbb first commit
authored
139 **sample93.png**
140
2f0c4ac @ashbb deleted patches
authored
141 ![sample93.png](http://github.com/ashbb/shoes_tutorial_html/raw/master/images/sample93.png)
fe86a81 @ashbb first commit
authored
142
6e57531 @ashbb totally corrected and add the acknowledgment.
authored
143 Let's enjoy Ruby and Shoes with the Lovely Creatures!
fe86a81 @ashbb first commit
authored
144
145 FIN.
45e6b24 @ashbb Finished to confirm all 132 sample codes. :)
authored
146
147
148 Policeman
149 ---------
150
151 The sample91.rb and sample92.rb worked with Shoes-0.r1263 as same as Raisins.
152
153 Replace `String#to_a` to `String#split` for Ruby 1.9. Then the sample93.rb also worked well.
154
Something went wrong with that request. Please try again.