HotCocoa is a thin & idiomatic Ruby layer that sits above Cocoa and other frameworks, developed by Rich Kilmer. MacRuby 0.5, which was recently rev’d, now supports HotCocoa.

HotCocoa used to be developed inside the MacRuby project, but we decided that it would have a better life on GitHub, where it is far easier for developers to submit contributions…

HotCocoa also has been transformed as a gem and is included in the 0.5 package installer. Be sure to require rubygems before using it.

To see more information on HotCocoa (including tutorial) see macruby.org.

require 'rubygems'
require 'hotcocoa'
include HotCocoa
application do |app|
  win = window :size => [100,50]
  b = button :title => 'Hello'
  b.on_action { puts 'World!' }
  win << b
end

Installation

sudo macgem install hotcocoa

(Please note ‘macgem’ instead of ‘gem’)

[Source on GitHub] [Homepage]


Have comments? Send a tweet to @TheChangelog on Twitter.

Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.