Skip to content

Instantly share code, notes, and snippets.

@iafonov
Created October 19, 2009 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iafonov/213279 to your computer and use it in GitHub Desktop.
Save iafonov/213279 to your computer and use it in GitHub Desktop.
require 'hotcocoa'
# Replace the following code with your own hotcocoa code
class Application
include HotCocoa
def start
application :name => "Sample" do |app|
app.delegate = self
window :frame => [100, 100, 500, 500], :title => "Sample" do |win|
win << label(:text => "Hello from HotCocoa", :layout => {:start => false})
win.will_close { exit }
end
end
end
# file/open
def on_open(menu)
end
# file/new
def on_new(menu)
end
# help menu item
def on_help(menu)
end
# This is commented out, so the minimize menu item is disabled
#def on_minimize(menu)
#end
# window/zoom
def on_zoom(menu)
end
# window/bring_all_to_front
def on_bring_all_to_front(menu)
end
end
Application.new.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment