Skip to content

Instantly share code, notes, and snippets.

@jpoz
Created August 14, 2009 04:18
Show Gist options
  • Select an option

  • Save jpoz/167641 to your computer and use it in GitHub Desktop.

Select an option

Save jpoz/167641 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/macruby
framework 'AppKit'
class Ftang
def initialize
@app = NSApplication.sharedApplication
win = NSWindow.alloc.initWithContentRect([100, 100, 500, 500],
styleMask: NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask| NSResizableWindowMask,
backing: NSBackingStoreBuffered,
defer: false)
@timer = NSTimer.scheduledTimerWithTimeInterval(5, target:self,
selector:"go".to_sym, userInfo:nil,
repeats:true)
win.title = 'FTang!'
win.display
win.orderFrontRegardless
@app.run
end
def go
puts "HELLO!!!"
end
end
f = Ftang.new()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment