Amazon.com Widgets Warning Issue: Incomplete Implementation
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 22, 2013, 09:40:59 PM
Home Help Search chat Login Register   
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+  Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+  Programming in Objective-C, 4th edition
| |-+  Chapter 3
| | |-+  Warning Issue: Incomplete Implementation
Pages: [1]   Go Down
Print
Author Topic: Warning Issue: Incomplete Implementation  (Read 1026 times)
mesaBoogie
Newbie
*
Posts: 2






« on: March 07, 2012, 07:35:11 AM »

Hi,  new to O-C, weekend code warrior as3/C/VB......... so far this is a great book!!!!!!
OK using xCode 4.3
Program 3.2 working fine, makes total sense to me.  but I'm also getting this annoying warning message of Incomplete Implementation?Huh  which if I look a bit deeper, I'm getting Method definition for setNumerator and setDenominator not found? under the @interface.....

But it Works fine
Logged
skochan
Administrator
Hero Member
*****
Posts: 3103







« Reply #1 on: March 07, 2012, 09:00:04 AM »

THe compiler is checking to make sure you implemented all the methods specified in your interface section.  Check the spelling and make sure the name match between the two sections.

Cheers,

Steve
Logged
mesaBoogie
Newbie
*
Posts: 2






« Reply #2 on: March 07, 2012, 09:06:01 AM »

How stupid of me, I forgot to call out .........: (int) n and ...........(int) d  in the @interface methods

All better now.... Thanks..
Logged
integr8d
Newbie
*
Posts: 4






« Reply #3 on: March 09, 2012, 05:37:21 PM »

Caught me too. Careless errors... tisk tisk.
Logged
cyberfed
Newbie
*
Posts: 1


Email




« Reply #4 on: April 24, 2012, 04:14:01 PM »

Thank you for this. At first I was getting grumpy clearly blaming the book and not myself  Grin

Sure enough I had declared SetNumerator and then called setNumerator. Darn case sensitive programming!!  Wink
Made me chuckle, I am starting to remember why I had given up programming  in the past!


All kidding aside the book is GREAT.
xCode is pretty nice compiler, really helps you find your mistakes. Like it!
Logged
mikeb2332
Newbie
*
Posts: 3






« Reply #5 on: June 15, 2012, 06:12:10 AM »

Great book so far!  I'm trying to learn O-C as my first language and this book has great explanations of all of the concepts...I am having this same issue (I apologize for the double post but I first posted my code in the "error in program 3.2" section and then I saw this topic) but I'm not finding any error in my spelling...although I'm sure I've done something wrong, I just need a little help finding it.

Thanks,
Michael

#import <Foundation/Foundation.h>

@interface Fraction: NSObject
-(void) print;
-(void) setNumerator: (int) n;
-(void) setDenominator: (int) d;

@end

@implementation Fraction                                         //"Incomplete implementation"
{

    int numerator;
    int denominator;
}

-(void) Print
{
    NSLog (@"%i/%i", numerator, denominator);
}


-(void) setNumerator: (int) n 
{
    numerator = n;
}


-(void) setDenominator: (int) d
{
    denominator = d;
}

@end



int main (int argc, char * argv[])
{

    @autoreleasepool {
        Fraction *myFraction;
       
        //Creat an instance of a Fraction.
       
        myFraction = [Fraction alloc];
        myFraction = [myFraction init];
       
        //Set Fraction to 1/3.
       
        [myFraction setNumerator: 1];
        [myFraction setDenominator: 3];
       
        //Display the fraction using the print method.
       
        NSLog (@"The value of myFraction is:");
        [myFraction print];                                              //"Thread1: Program received signal: "SIGABRT".
       
    }
    return 0;
}
Logged
fujilla
Global Moderator
Sr. Member
*****
Posts: 270


WWW




« Reply #6 on: June 15, 2012, 10:23:08 AM »

I have answered this in your main question thread.

Probably best not to duplicate questions throughout the forum  Wink
Logged
Pages: [1]   Go Up
Print
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.