home *** CD-ROM | disk | FTP | other *** search
-
- #import "Converter.h"
-
- @implementation Converter
-
- - convert:sender
- {
- if(convertingTemp) [output setFloatValue:(1.8*[input floatValue]+32.)];
- else [output setFloatValue:(2.2*[input floatValue])];
- return self;
- }
-
- - selectWt:sender
- {
- [inputLabel setStringValue:"Kgs"];
- [outputLabel setStringValue:"Lbs"];
- convertingTemp=NO;
- return self;
- }
-
- - selectTemp:sender
- {
- [inputLabel setStringValue:"C"];
- [outputLabel setStringValue:"F"];
- convertingTemp=YES;
- return self;
- }
-
- @end
-