Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'hotcocoa/graphics'
- include HotCocoa
- include Graphics
- NSApplicationMain(0, nil)
- application do |app|
- canvas = Canvas.for_rendering(:size => [400,400])
- canvas.background(Color.white)
- win = window :size => [100,50]
- b = button :title => 'Hello'
- b.on_action { puts 'World!' }
- win << b
- puts "HERE"
- end
Add Comment
Please, Sign In to add comment