Results 1 to 5 of 5
  1. #1
    Error message in XCode

    Member Since
    Oct 18, 2008
    Posts
    6
    Error message in XCode
    I followed a tutorial of XCode and I have got an error message of
    error: 'disp_update' undeclared (first use in this function)
    May I ask do you know how to solve this? Thanks in advance!!

    --CounterController.m

    #import "CounterController.h"

    @implementation CounterController
    - (IBAction)abutton_pushedid)sender {
    count++;
    [disp_upate setIntValue:count];
    }

    - (IBAction)mbutton_pushedid)sender {
    count--;
    [disp_upate setIntValue:count];
    }

    - (IBAction)pbutton_pushedid)sender {
    count+=10;
    [disp_upate setIntValue:count];
    }
    @end

    --CounterController.h
    #import <Cocoa/Cocoa.h>

    @interface CounterController : NSObject{
    IBOutlet id disp_update;
    int count;
    }
    - (IBAction)abutton_pushedid)sender;
    - (IBAction)mbutton_pushedid)sender;
    - (IBAction)pbutton_pushedid)sender;
    @end

  2. #2
    Error message in XCode

    Member Since
    May 02, 2009
    Posts
    480
    Specs:
    MBP 2.33 4GB: MacPro 8 Core 2.8, 16GB: MacMini 2.26 4GB: MacMin 2.53 4GB: iPhone3GS 32GB
    You misspelled the 'dis_update' member in CounterController.m. In your implementation code you have it spelled as 'dis_upate'.

  3. #3
    Error message in XCode

    Member Since
    Oct 18, 2008
    Posts
    6
    I am sorry, but I could not see where is the misspell, please advice. Thank you very much.

  4. #4
    Error message in XCode

    Member Since
    May 02, 2009
    Posts
    480
    Specs:
    MBP 2.33 4GB: MacPro 8 Core 2.8, 16GB: MacMini 2.26 4GB: MacMin 2.53 4GB: iPhone3GS 32GB
    In your .h file you have declared

    IBOutlet id disp_update;
    In your .m file you are attempting to reference this member as

    [disp_upate setIntValue:count];

    dis_update and disp_upate are not the same thing. You need to change your .m file to reference

    'disp_update'

    your missing the 'd'

  5. #5
    Error message in XCode

    Member Since
    Oct 18, 2008
    Posts
    6
    Oh!!!! Thanks!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Xcode mkdir error?
    By Haxorus111 in forum OS X - Development and Darwin
    Replies: 2
    Last Post: 09-27-2011, 08:35 PM
  2. Xcode internal error
    By sony in forum OS X - Development and Darwin
    Replies: 4
    Last Post: 03-05-2011, 03:09 PM
  3. Xcode error
    By konignlol in forum OS X - Development and Darwin
    Replies: 2
    Last Post: 03-09-2010, 09:09 AM
  4. c++ xcode error
    By alex101 in forum OS X - Operating System
    Replies: 2
    Last Post: 08-23-2009, 08:31 PM
  5. Xcode C++ Compiler error
    By steved3298 in forum OS X - Development and Darwin
    Replies: 2
    Last Post: 07-22-2004, 12:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •