Skip to content

Instantly share code, notes, and snippets.

@shelling
Created July 8, 2009 13:21
Show Gist options
  • Save shelling/142845 to your computer and use it in GitHub Desktop.
Save shelling/142845 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'osx/cocoa'
app = OSX::NSApplication.sharedApplication
window = OSX::NSWindow.alloc.initWithContentRect_styleMask_backing_defer(
[0,0,500,500],
OSX::NSTitledWindowMask + OSX::NSClosableWindowMask,
OSX::NSBackingStoreBuffered,
true
)
window.setTitleWithRepresentedFilename("Hello")
window.makeKeyAndOrderFront(nil)
OSX::NSApp.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment