Skip to content

Instantly share code, notes, and snippets.

@atomicules
Created February 23, 2010 15:08
Show Gist options
  • Save atomicules/312280 to your computer and use it in GitHub Desktop.
Save atomicules/312280 to your computer and use it in GitHub Desktop.
#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
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