home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep (Enterprise)
/
OpenStepENTCD.toast
/
OEDEV
/
DEV.Z
/
ConverterController.m
< prev
next >
Wrap
Text File
|
1996-07-30
|
666b
|
30 lines
/*
You may freely copy, distribute, and reuse the code in this example.
NeXT disclaims any warranty of any kind, expressed or implied, as to its
fitness for any particular use.
*/
#import "ConverterController.h"
#import "Converter.h"
@implementation ConverterController
- (void)convert:(id)sender
{
float rate, amount, total=0.0;
amount = [dollarField floatValue];
rate = [rateField floatValue];
total = [converter convertAmount:amount byRate:rate];
[totalField setFloatValue:total];
[rateField selectText:self];
}
- (void)awakeFromNib
{
[rateField selectText:self];
[[rateField window] makeKeyAndOrderFront:self];
}
@end