Re:CurrencyConverterTutorial.pdf (Thanks:-)
Re:CurrencyConverterTutorial.pdf (Thanks:-)
- Subject: Re:CurrencyConverterTutorial.pdf (Thanks:-)
- From: Nobu <email@hidden>
- Date: Mon, 7 Jan 2002 15:36:19 +0900
Thank you very much.
Mr. Jeff LaMarche, Mr. Ricky Sharp and Tom Harrington.
First step.
I edited source code.
_____ add
> total = (float)[Converter convertAmount: amt atRate: rate];
I got same error and warning messages.
Secound step.
> See your ConverterController.h file to see what the name of your
Converter instance
> is...your line of code then becomes:
> total = [xxx convertAmount: amt atRate: rate];
> where xxx is the name of your Converter instance.
I checked Convert.h and Convert.m
---
/* Converter */
#import <Cocoa/Cocoa.h>
@interface Converter : NSObject
{
}
-(float)convertAmount:(float)amt atRate:(float)rate;
@end
--- Converter.m
#import "Converter.h"
@implementation Converter
- (float)convertAmount:(float)amt atRate:(float)rate
{
return (amt * rate);
}
@end
Last step.
> This should read as follows:
> total = [converter convertAmount: amt atRate: rate];
I edited "Converter" to "converter"
OK ! I got no error and no warning messages.
But, I wrote Convert.h.
@interface Converter : NSObject
{
}
-(float)convertAmount:(float)amt atRate:(float)rate;
@end
"Converter" is class name isn't it. Instance name is "converter" WHY?
Oh I'm headache.