얘들 아, AppController와 Robot의 두 클래스가 있습니다.Objective-C 'Robot'이 '-nothingToDo'에 응답하지 않을 수 있습니다.
AppController.h
#import <Cocoa/Cocoa.h>
#import "Robot.h"
@interface AppController : NSObject {
Robot *myRobot;
}
- (IBAction)initPort:(id)sender;
AppController.m
#import "AppController.h"
@implementation AppController
- (IBAction)initPort:(id)sender
{
[myRobot nothingDo];
}
@end
Robot.h
#import <Cocoa/Cocoa.h>
@interface Robot : NSObject {
}
-(void)nothingToDo:(id)sender;
Robot.m
#import "Robot.h"
@implementation Robot
-(void)nothingToDo:(id)sender
{
NSLog(@"bla-bla-bla");
}
나는 '로봇'을보고 실행하기 위해 노력하고있어 경우에 '-nothingToDo'응답하지 수는 - (무효) nothingToDo이 수행되지 않습니다. 뭐가 문제 야?
그래, 도움이 :))))하지만, 전에 콜론에 대해 몰랐다. 감사합니다 – moldov