• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTimer May not to scheduledtimerWithInterval
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTimer May not to scheduledtimerWithInterval


  • Subject: Re: NSTimer May not to scheduledtimerWithInterval
  • From: "Sean McBride" <email@hidden>
  • Date: Fri, 16 Feb 2007 12:26:22 -0500
  • Organization: Rogue Research

On 2007-02-16 11:48, Daniel Bruchez said:

>I'm new to Xcode and was trying to add a Timer Event to my
>application. I get the following warning when I tried add this code
>to my application:

Welcome!  But I must say, this would be better on the cocoa list.  This
list is for Xcode the tool.

>warning:"NSTimer may not respond to
>'+scheduledTimerWithInterval:target:selector:userInfo:repeats:'
>Messages without a matching method signature will be assumed to
>return'id' and accept'...' as arguments.)
>
>Here's a snip of my code-->>
>
>		//Create Timer
>		scantimer = [ [NSTimer scheduledTimerWithInterval:1.0
>												target:self
>												selector:@selector(scanBrain:)
>												userInfo:nil
>												repeats:YES] retain] ;

The message is right.  It's "schedule
dTimerWithTimeInterval:target:selector:userInfo:repeats:" you forgot the
'Time'.

>	NSCalendarDate *now;
>	now = [NSCalendarDate calendarDate];

Don't use NSCalendarDate, it only supports the Gregorian calendar.  Use
NSDate instead.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSTimer May not to scheduledtimerWithInterval (From: Daniel Bruchez <email@hidden>)

  • Prev by Date: Re: NSTimer May not to scheduledtimerWithInterval
  • Next by Date: What is the price of Xcode ?
  • Previous by thread: Re: NSTimer May not to scheduledtimerWithInterval
  • Next by thread: What is the price of Xcode ?
  • Index(es):
    • Date
    • Thread