I’m getting some warnings that somethings may not respond to a function.
#import "Lane.h"
#import "TrafficController.h"
@implementation Lane
@synthesize controller;
-(void)awakeFromNib
{
[controller registerLane:self]; -- 'TrafficController' may not respond to '-registerlane'
srandom(time(NULL));
[self start];
}
-(void)start
{
long newStartTime = random() % 200;
carStartTimer = [NSTimer scheduledTimerWithTimeInterval:newStartTime / 1000.0 target:self selector:@selector(startTimerFired:) userInfo:nil repeats:YES];
[carStartTimer retain];
}
-(void)startTimerFired: (NSTimer*)timer
{
//pick a random number of milliseconds to fire again at
long newStartTime = random() % 1500 + 500;
[timer setFireDate:[NSDate datewWithTimeIntervalSinceNow:newStartTime / 1000.0]];
[controller startCarFromLane:self]; - 'TrafficController' may not respond to '-startCarFromLane'
NSLog(@"Starting new car");
}
-(void)stop
{
[carStartTimer invalidate];
[carStartTimer release];
carStartTimer = nil;
}
@end
Does it mean that those functions arent declared in this or other header file? Or does it mean something else?
In your TrafficController.h, do you have a line like:
If you don’t, you should have