[MacRuby-devel] NSTimer.timerWithTimeInterval ?

Robert Feldt robert.feldt at gmail.com
Mon Nov 7 11:33:34 PST 2011


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 `timerWithTimeInterval' for NSTimer:Class (NoMethodError)

which is very confusing given:

http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/Reference/NSTimer.html#//apple_ref/occ/cl/NSTimer

and

http://stackoverflow.com/questions/1449035/how-do-i-use-nstimer

What am I missing here? Any advice appreciated!?

-- 
Thanks in advance,

/Robert Feldt


More information about the MacRuby-devel mailing list