New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Apps and Games Discussion of applications and games available for Mac OS X.

Error message in XCode


Post Reply New Thread Subscribe

 
Thread Tools
fidodidohk

 
Member Since: Oct 18, 2008
Posts: 6
fidodidohk is on a distinguished road

fidodidohk is offline
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
QUOTE Thanks
wmprice1240

 
Member Since: May 03, 2009
Posts: 480
wmprice1240 has a spectacular aura about
Mac Specs: MBP 2.33 4GB: MacPro 8 Core 2.8, 16GB: MacMini 2.26 4GB: MacMin 2.53 4GB: iPhone3GS 32GB

wmprice1240 is offline
You misspelled the 'dis_update' member in CounterController.m. In your implementation code you have it spelled as 'dis_upate'.
QUOTE Thanks
fidodidohk

 
Member Since: Oct 18, 2008
Posts: 6
fidodidohk is on a distinguished road

fidodidohk is offline
I am sorry, but I could not see where is the misspell, please advice. Thank you very much.
QUOTE Thanks
wmprice1240

 
Member Since: May 03, 2009
Posts: 480
wmprice1240 has a spectacular aura about
Mac Specs: MBP 2.33 4GB: MacPro 8 Core 2.8, 16GB: MacMini 2.26 4GB: MacMin 2.53 4GB: iPhone3GS 32GB

wmprice1240 is offline
In your .h file you have declared

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

Quote:
[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'
QUOTE Thanks
fidodidohk

 
Member Since: Oct 18, 2008
Posts: 6
fidodidohk is on a distinguished road

fidodidohk is offline
Oh!!!! Thanks!!
QUOTE Thanks

Post Reply New Thread Subscribe


« Code Editor and FTP? | iTunes opens real slow »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Xcode, Subversion, and directory behaviour Reinderien OS X - Development and Darwin 1 03-10-2009 12:50 PM
Carbon framework on XCode Rafi Shalom OS X - Development and Darwin 1 04-17-2008 02:14 PM
Xcode 1.5 alejandrico OS X - Development and Darwin 0 06-03-2006 06:56 PM
XCode Include path problem Jove OS X - Development and Darwin 0 03-18-2005 10:41 AM
New Xcode plug-in helps developers reuse code Murlyn OS X - Development and Darwin 0 11-10-2003 01:16 PM

All times are GMT -4. The time now is 08:26 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?