[MacRuby-devel] NSTimer.timerWithTimeInterval ?

Robert Feldt robert.feldt at gmail.com
Mon Nov 7 11:54:22 PST 2011


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 <rich at infoether.com> wrote:
> 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:
>
> On Nov 7, 2011, at 2:33 PM, 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.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
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>



-- 
Best regards,

/Robert Feldt
--
Tech. Dr. (PhD), Assoc. Professor in Software Engineering
Chalmers, Software Engineering Dept
Blekinge Institute of Technology, Software Engineering Research Lab
robert.feldt (a) chalmers.se     or     robert.feldt (a) gmail.com
Mobile phone: +46 (0) 733 580 580
http://www.cse.chalmers.se/~feldt


More information about the MacRuby-devel mailing list