Skip to content

Instantly share code, notes, and snippets.

@sebastiangeiger
Forked from bradleybuda/Hello MacRuby
Created October 16, 2011 12:55
Show Gist options
  • Save sebastiangeiger/1290843 to your computer and use it in GitHub Desktop.
Save sebastiangeiger/1290843 to your computer and use it in GitHub Desktop.
brad@brad-laptop:~ $ macirb
irb(main):001:0> framework 'Cocoa'
=> true
irb(main):002:0> app = NSApplication.sharedApplication
=> #<NSApplication:0x8003a8500>
irb(main):003:0> status_bar = NSStatusBar.systemStatusBar
=> #<NSSystemStatusBar:0x8003b8ec0>
irb(main):004:0> item = status_bar.statusItemWithLength(NSVariableStatusItemLength)
=> #<NSStatusItem:0x8003b7c00>
irb(main):005:0> item.title = "Hello MacRuby!"
=> "Hello MacRuby!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment