Re: [MacRuby-devel] NSTimer.timerWithTimeInterval ?

2011-11-07 Thread Robert Feldt
Yes, thanks again. What "got me" here is that the error message complained that the method wasn't there so I didn't really consider looking at the formatting of the parameters. I realize now that MacRuby probably does method lookup/disambiguation based on the "param names" (or what they are called

Re: [MacRuby-devel] NSTimer.timerWithTimeInterval ?

2011-11-07 Thread Matt Aimonetti
Here is an example of a small game written entirely in MacRuby and which uses NSTimer to run the game loop: https://github.com/mattetti/phileas_frog/blob/master/game_loop.rb#L32-36 I hope it helps, - Matt On Mon, Nov 7, 2011 at 11:54 AM, Robert Feldt wrote: > Thanks guys, I'll try to read up on

Re: [MacRuby-devel] NSTimer.timerWithTimeInterval ?

2011-11-07 Thread Robert Feldt
Thanks guys, I'll try to read up on some more tutorials before making a fool of myself again... ;) Cheers, Robert On Mon, Nov 7, 2011 at 8:42 PM, Richard Kilmer wrote: > Take the calling param sequence and turn it into a 1.9 hash statement in > order :) > > timer = NSTimer.timerWithTimeInterva

Re: [MacRuby-devel] NSTimer.timerWithTimeInterval ?

2011-11-07 Thread Richard Kilmer
Take the calling param sequence and turn it into a 1.9 hash statement in order :) timer = NSTimer.timerWithTimeInterval 60, target: self, selector: 'recheckAndUpdateTitle:', userInfo: nil, repeats: true because this is the actual selector: timerWithTimeInterval:target:selector:userInfo:repeats

Re: [MacRuby-devel] NSTimer.timerWithTimeInterval ?

2011-11-07 Thread Elliot Temple
On Nov 7, 2011, at 11:33 AM, Robert Feldt wrote: > Hi, > > Noob to both MacRuby and Cocoa/Objective-C here (but not Ruby) so > please forgive is this is obvious but when I try to call > > timer = NSTimer.timerWithTimeInterval(60, self, > 'recheckAndUpdateTitle:', nil, true) > NSRunLoop.currentR

[MacRuby-devel] NSTimer.timerWithTimeInterval ?

2011-11-07 Thread Robert Feldt
Hi, Noob to both MacRuby and Cocoa/Objective-C here (but not Ruby) so please forgive is this is obvious but when I try to call timer = NSTimer.timerWithTimeInterval(60, self, 'recheckAndUpdateTitle:', nil, true) NSRunLoop.currentRunLoop.addTimer(timer) I get: undefined method `timerWithTimeInt