Skip to content

Commit

Permalink
Confirmed 00533-01000 with Shoes-0.r1263. Finished 99 / 132 samples.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashbb committed Oct 18, 2009
1 parent 89ec419 commit a354880
Show file tree
Hide file tree
Showing 27 changed files with 150 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -54,7 +54,7 @@ Table of contents
- [00529 UTF-8 (sample45.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00529_UTF-8.mdown)
- [00530 Open a new app window (sample46.rb, sample48.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00530_Open_a_new_app_window.mdown)
- [00531 Open the Shoes console window from your app (sample51.rb, sample55.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00531_Open_the_Shoes_console_window_from_your_app.mdown)
- [00532 Customize Shoes Class (sample53.rb, sample53-1.rb, sample53-1.rb, sample53-2.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00532_Customize_Shoes_Class.mdown)
- [00532 Customize Shoes Class (sample53.rb, sample53-1.rb, sample53-2.rb, sample53-2.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00532_Customize_Shoes_Class.mdown)
- [00533 Image Effects with blur method (sample54.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00533_Image_Effects_with_blur_method.mdown)
- [00534 Video playback (sample59.rb, sample59-1.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00534_Video_playback.mdown)
- [00535 Scope: local variable and instance variable (sample60.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00535_Scope__local_variable_and_instance_variable.mdown)
Expand Down
2 changes: 1 addition & 1 deletion changelog.mdown
@@ -1,6 +1,6 @@
Change log:
-----------
Oct 18th, 2009: Confirmed 00521-00532 with Policeman (0.r1263)
Oct 18th, 2009: Confirmed 00521-01000 with Policeman (0.r1263)
Oct 17th, 2009: Confirmed 00508-00520 with Policeman (0.r1263)
Oct 15th, 2009: Confirmed 00507 with Policeman (0.r1263)
Oct 14th, 2009: Confirmed 00501-00506 with Policeman (0.r1263)
Expand Down
6 changes: 6 additions & 0 deletions mdowns/00533_Image_Effects_with_blur_method.mdown
Expand Up @@ -36,3 +36,9 @@ INSIDE SHOES 2 <br>
Note
----
Shoes may crash without very enough interval between mouse clicks. Oh,... :(


Policeman
---------

The sample54.rb worked well with Shoes-0.r1263. Still have *the above note*, though... :-P
8 changes: 8 additions & 0 deletions mdowns/00534_Video_playback.mdown
Expand Up @@ -51,3 +51,11 @@ I referred to the following web site.


Just one-liner solution playing YouTube video on Shoes!

**Note**: This one-liner doesn't work now. I'm not sure why. YouTube changed the API??


Policeman
---------

Video is not supported so far.
Expand Up @@ -26,3 +26,9 @@ This snapshot is created by the following setps.
- clicked 'new' button 30 times
- picked up and drew 6 ovals to the lower side
- picked up and drew 7 rects to the upper side


Policeman
---------

The sample60.rb worked well with Shoes-0.r1263
6 changes: 6 additions & 0 deletions mdowns/00536_edit_line_with_block.mdown
Expand Up @@ -39,4 +39,10 @@ By using edit\_line with block, this app can just update the sum every time one
**sample63.png**

![sample63.png](http://github.com/ashbb/shoes_tutorial_html/raw/master/images/sample63.png)


Policeman
---------

The sample63.rb worked well with Shoes-0.r1263

5 changes: 5 additions & 0 deletions mdowns/00537_One_way_of_layer_manipulation.mdown
Expand Up @@ -25,3 +25,8 @@ Usually the later-made Shape instances are layouted on the early-made ones. So,

![sample64.png](http://github.com/ashbb/shoes_tutorial_html/raw/master/images/sample64.png)


Policeman
---------

The sample64.rb worked well with Shoes-0.r1263
5 changes: 5 additions & 0 deletions mdowns/00538_Show_and_hide_the_slots.mdown
Expand Up @@ -30,3 +30,8 @@ At first, preparing all slots hided in piles. Then do show or hide them at the r
**sample66.png**

![sample66.png](http://github.com/ashbb/shoes_tutorial_html/raw/master/images/sample66.png)

Policeman
---------

The sample66.rb worked well with Shoes-0.r1263
14 changes: 13 additions & 1 deletion mdowns/00539_class_definition_outside_of_Shoes.app_block.mdown
Expand Up @@ -56,7 +56,7 @@ Plseae run and read the following snippets.
Another way of recreating sample69.

# sample69-2.rb
class Sheep < Widget
class Sheep < Shoes::Widget
def initialize
oval 0, 0, 20, 20
end
Expand All @@ -82,3 +82,15 @@ Note
----
In above `sample69-2.rb`, I use the method name `run` instead of `draw`.
Because Shoes has already defined `draw` method, hence if I use the same name, it is overloaded and Shoes can't open app window.


Policeman
---------

The sample69.rb, sample69-1.rb worked well with Shoes-0.r1263.

The sample69-2.rb also worked well after a bit edited like this:

class Sheep < Widget ---> class Sheep < Shoes::Widget


4 changes: 4 additions & 0 deletions mdowns/00540_flexible_time_interval.mdown
Expand Up @@ -120,3 +120,7 @@ Another solution using mixin Observable module. It's interesting, although there
The same as sample72.png


Policeman
---------

All sample72.rb to sample72-4.rb worked with Shoes-0.r1263 as same as Raisins.
6 changes: 6 additions & 0 deletions mdowns/00541_Shoes_comes_with_sqlite3_ruby.mdown
Expand Up @@ -30,3 +30,9 @@ References
----------
- [SQLite/Ruby FAQ](http://sqlite-ruby.rubyforge.org/sqlite3/faq.html)
- [SQLite Tutorial](http://souptonuts.sourceforge.net/readme_sqlite_tutorial.html)


Policeman
---------

The sample73.rb worked well with Shoes-0.r1263
Expand Up @@ -111,4 +111,8 @@ Although, needed to edit the sample74.rb. Because Shoes::Shape class has no scal
end


Policeman
---------

The sample74.rb and sample74-1.rb worked well with Shoes-0.r1263. Policeman looks like a bit faster than Raisins. :)

4 changes: 4 additions & 0 deletions mdowns/00608_Building_Shoes_with_Windows_DDK.mdown
Expand Up @@ -53,3 +53,7 @@ Then `rake package` worked well. I got `shoes-0.r1243.exe` under `pkg` directory
*NOTE: But now my the above `shoes-0.r1243.exe` is on Ruby 1.8.6. Need to move into Ruby 1.9.1 asap.* :-P


Policeman
---------

Look at [this](http://github.com/ashbb/shoes_hack_note). :-D
Expand Up @@ -28,3 +28,10 @@ This is a great blog. I was inspired. Thanks to Paul Harris. He tweeted me.
**sample70.png**

![sample70.png](http://github.com/ashbb/shoes_tutorial_html/raw/master/images/sample70.png)


Policeman
---------

The sample70.rb worked well with Shoes-0.r1263

8 changes: 8 additions & 0 deletions mdowns/00610_red_equal_blue___.mdown
Expand Up @@ -83,3 +83,11 @@ For more specifically. Look at sample71-1.rb
![sample71-1.png](http://github.com/ashbb/shoes_tutorial_html/raw/master/images/sample71-1.png)

Why `Umm... red equal blue???` is shown?


Policeman
---------

The sample71.rb and sample71-1.rb worked with Shoes-0.r1263. Although the behavior is the same as Raisins.


6 changes: 6 additions & 0 deletions mdowns/00702_Assignment_2_footracer.mdown
Expand Up @@ -84,3 +84,9 @@ And the 2nd:
(a.stop; para winner.style[:name]) if winner.left > 150
end
end


Policeman
---------

The above two mini-footracers worked well with Shoes-0.r1263
15 changes: 12 additions & 3 deletions mdowns/00703_Assignment_3_Mini_Adventure_Game_GUI_Part.mdown
Expand Up @@ -89,10 +89,11 @@ See the below code, line 61: @hunter.star 20, 30, 5, 10.0, 5.0, :fill => gold, :
@rooms = @pos.collect{|x, y| rect x, y, 30, 30, :curve => 15, :fill => green}
[0, 8].each{|n| @rooms[n].style :fill => red, :curve => 5}

ROOMS.each_with_index do |r, i|
i = -1
ROOMS.each_line do |r|
name, paths = r.chomp.split(':')
@rooms[i].style :name => name, :paths => paths
@rooms[i+=1].style :name => name, :paths => paths
end
@star = star 365, 265, 5, 10.0, 5.0, :fill => gold, :stroke => gold
Expand Down Expand Up @@ -132,4 +133,12 @@ See the below code, line 61: @hunter.star 20, 30, 5, 10.0, 5.0, :fill => gold, :
end
end


Have fun!


Policeman
---------

Ruby 1.9 doesn't have `each_with_index()` method. So, I revised `sample52-render.rb` a little bit. Now, the sample52.rb works well with Shoes-0.r1263.

5 changes: 5 additions & 0 deletions mdowns/00704_Assignment_4_Pong_in_Shoes.mdown
Expand Up @@ -78,3 +78,8 @@ Note
----
[a pong challenge](http://www.mail-archive.com/shoes@code.whytheluckystiff.net/msg02520.html)


Policeman
---------

The sample58.rb worked well with Shoes-0.r1263
7 changes: 7 additions & 0 deletions mdowns/00705_Assignment_5_Riddles_in_Shoes.mdown
Expand Up @@ -110,3 +110,10 @@ What lives on its own substance and dies when it devours itself? --> candle <br>
Yesterday is always before today. But there is a place where yesterday always follows today. Where? --> dictionary <br>
How many cookies can you eat on an empty stomach? --> one <br>
What clothing does a house wear? --> address <br>



Policeman
---------

Ruby 1.9 doesn't have `String#to_a()` method. So, I revised `sample67.rb` a little bit. Now, the sample67.rb works well with Shoes-0.r1263.
8 changes: 7 additions & 1 deletion mdowns/00706_Assignment_6_Dog_Hunts_Sheep_Game.mdown
Expand Up @@ -36,7 +36,7 @@ Create your own **Dog Hunts Sheep Game** by doing the following five steps.
# sample68.rb
W, H = 600, 450

class Sheep < Widget
class Sheep < Shoes::Widget
def initialize x
@s = oval x, H - 15, 15, :fill => white, :strokewidth => 3
@a = animate(20) do
Expand Down Expand Up @@ -100,3 +100,9 @@ Have fun!
NOTE
----
Original article was created by [Karel Minarik](http://github.com/karmi). Thank you for giving us consent to use [the material](http://www.restafari.org/object-oriented-sheep-running-in-ruby-shoes.html).


Policeman
---------

Replaced `Widget` to `Shoes::Widget`. Then the sample68.rb worked well with Shoes-0.r1263.
20 changes: 14 additions & 6 deletions mdowns/00800_Relevant_web_sites__Links_.mdown
Expand Up @@ -2,13 +2,13 @@ Relevant web sites (Links)
--------------------------

Three manuals: Nobody Knows Shoes (NKS) and Built-in Manual and Online Reference Manual. <br>
<http://shoooes.net/manuals/> <br>
<http://shoes.heroku.com/> <br>

The Shoes Manual for printing (All in one HTML manual and PDF manual)<br>
<http://github.com/ashbb/shoes_manual/><br>

The Shoes Help Desk: The spot for beginners and advanced Shoesers alike. <br>
<http://help.shoooes.net/> <br>
<http://shoes.home-lan.homelinux.com/> <br>

The Shoebox <br>
<http://the-shoebox.org/> <br>
Expand All @@ -18,7 +18,7 @@ Shoes - Rubys Cross Platform GUI App Toolkit - Grows Up <br>
<http://www.rubyinside.com/whys-shoes-grows-up-1014.html> <br>

RecentBuilds <br>
<http://github.com/why/shoes/wikis/recentbuilds> <br>
<http://wiki.github.com/shoes/shoes/recentbuilds> <br>

Shoes\_(GUI\_toolkit) in Wikipedia <br>
<http://en.wikipedia.org/wiki/Shoes_(GUI_toolkit)>
Expand All @@ -33,7 +33,7 @@ Attempted refactoring a bit to learn more. ;-)
# 05_interactivity_with_objects.rb
# http://github.com/karmi/shoes_demonstration_apps/tree/master

class Letter < Widget
class Letter < Shoes::Widget
def initialize img
@flag = false
img.click{@flag = true; @img = img}
Expand All @@ -43,11 +43,11 @@ Attempted refactoring a bit to learn more. ;-)
end
Shoes.app :width => 800, :height => 600 do
sound = video 'assets/drumfill.aif', :width => 0, :height => 0
#sound = video 'assets/drumfill.aif', :width => 0, :height => 0
para 'Input Your Name: '
spell = edit_line
button 'GO' do
sound.play
#sound.play
@canvas.clear do
spell.text.downcase.split('').each_with_index do |l, i|
letter image("letters/#{l}.jpg", :left => 100*(i%8), :top => 150*(i/8))
Expand All @@ -64,7 +64,15 @@ Attempted refactoring a bit to learn more. ;-)
end
end


**sample62.png**

![sample62.png](http://github.com/ashbb/shoes_tutorial_html/raw/master/images/sample62.png)


Policeman
---------

Replaced `Widget` to `Shoes::Widget` and commented out `video() and play()`. Then the sample62.rb worked well with Shoes-0.r1263.


5 changes: 5 additions & 0 deletions mdowns/00900_Appendix.mdown
Expand Up @@ -18,6 +18,11 @@ The Image Block At The Bottom Of Shoes <br>

Shoes mailing list in English
-----------------------------

** NOTE: New mailing list is this:**

<http://groups.google.co.jp/group/shoooes>

To join the mailing list:

Send a message to shoes AT code.whytheluckystiff.net <br>
Expand Down
7 changes: 4 additions & 3 deletions src/sample52-render.rb
Expand Up @@ -26,10 +26,11 @@ def show_map

@rooms = @pos.collect{|x, y| rect x, y, 30, 30, :curve => 15, :fill => green}
[0, 8].each{|n| @rooms[n].style :fill => red, :curve => 5}

ROOMS.each_with_index do |r, i|

i = -1
ROOMS.each_line do |r|
name, paths = r.chomp.split(':')
@rooms[i].style :name => name, :paths => paths
@rooms[i+=1].style :name => name, :paths => paths
end

@star = star 365, 265, 5, 10.0, 5.0, :fill => gold, :stroke => gold
Expand Down
6 changes: 3 additions & 3 deletions src/sample62.rb
Expand Up @@ -3,7 +3,7 @@
# 05_interactivity_with_objects.rb
# http://github.com/karmi/shoes_demonstration_apps/tree/master

class Letter < Widget
class Letter < Shoes::Widget
def initialize img
@flag = false
img.click{@flag = true; @img = img}
Expand All @@ -13,11 +13,11 @@ def initialize img
end

Shoes.app :width => 800, :height => 600 do
sound = video 'assets/drumfill.aif', :width => 0, :height => 0
#sound = video 'assets/drumfill.aif', :width => 0, :height => 0
para 'Input Your Name: '
spell = edit_line
button 'GO' do
sound.play
#sound.play
@canvas.clear do
spell.text.downcase.split('').each_with_index do |l, i|
letter image("letters/#{l}.jpg", :left => 100*(i%8), :top => 150*(i/8))
Expand Down
2 changes: 1 addition & 1 deletion src/sample67.rb
Expand Up @@ -17,7 +17,7 @@
def set_riddle
@num = Nums.pop
alert('*waves*') or exit unless @num
@q.text, @a = Riddles.to_a[@num].split(' --> ')
@q.text, @a = Riddles.split("\n")[@num].split(' --> ')
@you.text = nil if @you
end

Expand Down
2 changes: 1 addition & 1 deletion src/sample68.rb
@@ -1,7 +1,7 @@
# sample68.rb
W, H = 600, 450

class Sheep < Widget
class Sheep < Shoes::Widget
def initialize x
@s = oval x, H - 15, 15, :fill => white, :strokewidth => 3
@a = animate(20) do
Expand Down
2 changes: 1 addition & 1 deletion src/sample69-2.rb
@@ -1,5 +1,5 @@
# sample69-2.rb
class Sheep < Widget
class Sheep < Shoes::Widget
def initialize
oval 0, 0, 20, 20
end
Expand Down

0 comments on commit a354880

Please sign in to comment.