夥計們,我有兩個類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