Created
August 14, 2009 04:18
-
-
Save jpoz/167641 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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