I'm faced with the task to learn a new language: Objective C. In the past I have learned languages like Java and Visual Basic with it's abundances of developer resources I learned these languages swiftly like riding the waves. So here I am it's 4 o clock in the morning, lecture at 9, havent started my report which is due tommorow and I'm trying to figure out why I can't call a method. what the **** am i doing wrong?
My error: 'someMethod' undeclared (first use in this function)
The method was written in viewController.m,
What does it take to call a method in Objective C? I've thought it must have something to do with file im writing it in or I might need to make an instance? Can someone please point me out on where I should be going.
I wouldn't have to ask this question if Apple hadn't chosen a language so little used, with it's esoteric documentation it will drive any beginner programmer insane to the point where he will give up on developing for Apple. It's no wonder Microsoft has 90% of the market share.
Note: and yes I've googled for hours and can't anything.
My error: 'someMethod' undeclared (first use in this function)
The method was written in viewController.m,
Code:
#import "MemoPadViewController.h"
@implementation MemoPadViewController
- (IBAction)done
{
[textView resignFirstResponder];
[userInput resignFirstResponder];
}
- (IBAction)showText
{
NSInteger addedNum;
[B]addedNum = someMethod:10;[/B]<----the problem
addedNum = [someMethod 10]; <--this does not work either
}
- (int)someMethod:(int)xArg
{
return 5;
}
What does it take to call a method in Objective C? I've thought it must have something to do with file im writing it in or I might need to make an instance? Can someone please point me out on where I should be going.
I wouldn't have to ask this question if Apple hadn't chosen a language so little used, with it's esoteric documentation it will drive any beginner programmer insane to the point where he will give up on developing for Apple. It's no wonder Microsoft has 90% of the market share.
Note: and yes I've googled for hours and can't anything.