Hi all, i am new. i have a button A and want to call function B that returns the message "hello".
Can you please help me, Thank you
hello.h
hello.m
Can you please help me, Thank you
hello.h
PHP:
#import <Cocoa/Cocoa.h>
@interface hello : NSObject {
IBOutlet NSTextView *msg;
}
- (IBAction)button:(id)sender;
@end
hello.m
PHP:
#import "hello.h"
@implementation hello
- (IBAction)button:(id)sender {
--- what should come here? ---
}
- (--- what should come here? ---) {
NSMutableString *msg = [[NSMutableString alloc] init];
NSString *str = [NSString stringWithFormat:@"hello"];
[msg appendString:str];
return [msg autorelease];
}
@end