We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,870 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Incomplete Implementation

I have been trying to follow along with the tutorial on Apple's developer website: https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/SecondiOSAppTutorial/Introduction/Introduction.html but cannot figure out why my project will not run. I have one warning: Incomplete implementation in the BirdSightingDataController.m file:

#import "BirdSightingDataController.h"
#import "BirdSighting.h"

@interface BirdSightingDataController ()
- (void)initializeDefaultDataList;
@end

@implementation BirdSightingDataController

@synthesize masterBirdSightingList = _masterBirdSightingList;

- (void) initializeDefaultDataList
{
    NSMutableArray *sightingList = [[NSMutableArray alloc] init];

    self.masterBirdSightingList = sightingList;

    [self addBirdSightingWithName:@"Pigeon" location:@"Everywhere"];
}

- (void)setMasterBirdSightingList:(NSMutableArray *)newList
{
    if (_masterBirdSightingList != newList)
    {
        _masterBirdSightingList = [newList mutableCopy];
    }
}

- (id)init
{
    if (self = [super init])
    {
        [self initializeDefaultDataList];
    }       


    return self;

}

- (NSUInteger)countOfList
{
    return [self.masterBirdSightingList count];
}

- (BirdSighting *)objectAtIndex:(NSUInteger)theIndex
{
    return [self.masterBirdSightingList objectAtIndex:theIndex];
}

- (void)addBirdSightingWithName:(NSString *)inputBirdName location:(NSString *)inputLocation
{
    BirdSighting *sighting;

    NSDate *today = [NSDate date];

    sighting = [[BirdSighting alloc] initWithName:inputBirdName location:inputLocation 
                                                 date:today];
    [self.masterBirdSightingList addObject:sighting];
}
@end
1
Contributor
1
Reply
20 Hours
Discussion Span
9 Months Ago
Last Updated
3
Views
Dane2259
Newbie Poster
22 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

For some reason it doesn't like the private method initalizeDefaultDataList (on line 33) that was declared in the interface above the implementation declaration.

Dane2259
Newbie Poster
22 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.5213 seconds using 2.65MB