• 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: Timers in a Foundation Tool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Timers in a Foundation Tool


  • Subject: Re: Timers in a Foundation Tool
  • From: Phil Larson <email@hidden>
  • Date: Fri, 4 Jul 2003 15:10:57 -0700

On Friday, July 4, 2003, at 1:52 PM, Brian Ganninger wrote:

void launchEngine()
{
NSLog(@"Hello again...");
}

This is a function not a method. If you want to use an NSTimer you're going to have to have a class with a method signature:

- (void)launchEngine:(id)sender;

NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:2
target:nil selector:launchEngine() userInfo:nil repeats:TRUE];

After you make your class you can then send @selector(launchEngine:) as the argument for selector. launchEngine() is a function not a selector/method.

Phil Larson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Timers in a Foundation Tool (From: Brian Ganninger <email@hidden>)

  • Prev by Date: Re: Timers in a Foundation Tool
  • Next by Date: Re: Timers in a Foundation Tool
  • Previous by thread: Re: Timers in a Foundation Tool
  • Next by thread: Re: Timers in a Foundation Tool
  • Index(es):
    • Date
    • Thread