Created
February 23, 2010 15:08
-
-
Save atomicules/312280 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Testing differences between Shoes 2 and 3, Ruby 1.8 and Ruby 1.9 | |
#In Shoes 2 (and also version 1229 of Shoes 3 that I built with Ruby 1.8) this code works | |
#In Shoes 3, then in ui.rb ":attach => Window" must be replaced with ":attach => Shoes::Window" | |
#as otherwise the error "uninitialized constant UI::Window" occurs. | |
require 'ui' | |
Shoes.app do | |
extend UI | |
@content = stack do | |
ui | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module UI | |
def ui | |
#In shoes 3, ":attach => Window" must be ":attach => Shoes::Window" | |
flow :margin => 0, :attach => Window, :height => 50, :scroll => false do | |
para "test" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment