Created
January 23, 2011 07:53
-
-
Save katsuma/791905 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
framework 'Cocoa' | |
require 'rubygems' | |
require 'hotcocoa' | |
class Application | |
include HotCocoa | |
def start | |
application(:name => "Postie") do |app| | |
app.delegate = self | |
window(:size => [200, 200, 500, 500], :title => "1st MacRuby App") do |win| | |
b = button :title => "Hello" | |
b.on_action { puts "Hello World!" } | |
win << b | |
win << label(:text => "Hello from HotCocoa", :layout => {:start => false}) | |
win.will_close { exit } | |
end | |
end | |
end | |
end | |
Application.new.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment