Xcode Noob, needing assistance

Discussion in 'iOS Programming' started by jordanburnam199, Dec 24, 2010.

  1. jordanburnam199 macrumors newbie

    Dec 24, 2010
    I have just gotten a book on coding in cocoa, I am now creating a simple calculator that will add two nubmers. I have wrote the fusebox.m and the fusebox.h files. I am now trying to get the interface builder to read the class files, once I press read class files and then chose the correct .h file to read it then gives me this message in the .xib status bar.... "parsed 1 source file, but no classes were found or changed".... I do not understand what I did wrong. Below is the code that is in fusebox.m and fusebox.h respectivley.

    #import "Fusebox.h"
    @implementation Fusebox
    - (IBAction)calculateAnswerid)sender
    //this is where your code begins
    int num1,num2,answer;
    num1 = [numberField1 intValue];
    num2 = [numberField2 intValue];
    answer = num1 + num2;
    [answerField setIntValue:answer];
    //this is where your code ends
    /* Fusebox */
    #import <Cocoa/Cocoa.h>
    @interface Fusebox : NSObject
    IBOutlet id answerField;
    IBOutlet id numberField1;
    IBOutlet id numberField2;
    - (IBAction)calculateAnswerid)sender;
  2. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    Few comments.

    Your book is on Mac OS X development, not iPhone, but I guess you realize that.
    What book is it, and when was it published? The code you show is antique in some ways and probably not a good model to learn from now. Pretty much no one uses the read class files method anymore.

    Also, there's a typo in the code you show for the .m file.

    For learning Mac development I would recommend the books by Hillegas and Big Nerd Ranch.

Share This Page