hi, can anyone help me on a small app?
It's a cocoa application. I have created 1 NSTextField and 2 NSButton , all linked to a new instance called "subbox".
Its a "subtract 50$ / Add 50$ to dept"application (everytime u click on the button ur "stash" will rise/fall) At the beginning the variable "dept" (shown on the NSTextField) will be 1000$
Can u help me with that? Here are the subbox.h & subbox.m
SUBBOX.m:
"#import "subbox.h"
@implementation subbox
// #1 set "dept" to "1000"
- (IBAction)addid)sender // it shall add 50$ to the "dept" (= textbox)
{
}
- (IBAction)subtractid)sender // it shall subtract 50$ from the "dept" (=textbox) if "dept ? 0" (its not possible to get below 0)
{
}
@end"
---------------------------------------------------------------------------------
SUBBOX.h
"/* subbox */
#import <Cocoa/Cocoa.h>
@interface subbox : NSObject
{
IBOutlet id dept;
}
- (IBAction)addid)sender;
- (IBAction)subtractid)sender;
@end
"
HELP ME PLEASE
It's a cocoa application. I have created 1 NSTextField and 2 NSButton , all linked to a new instance called "subbox".
Its a "subtract 50$ / Add 50$ to dept"application (everytime u click on the button ur "stash" will rise/fall) At the beginning the variable "dept" (shown on the NSTextField) will be 1000$
Can u help me with that? Here are the subbox.h & subbox.m
SUBBOX.m:
"#import "subbox.h"
@implementation subbox
// #1 set "dept" to "1000"
- (IBAction)addid)sender // it shall add 50$ to the "dept" (= textbox)
{
}
- (IBAction)subtractid)sender // it shall subtract 50$ from the "dept" (=textbox) if "dept ? 0" (its not possible to get below 0)
{
}
@end"
---------------------------------------------------------------------------------
SUBBOX.h
"/* subbox */
#import <Cocoa/Cocoa.h>
@interface subbox : NSObject
{
IBOutlet id dept;
}
- (IBAction)addid)sender;
- (IBAction)subtractid)sender;
@end
"
HELP ME PLEASE