• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re:CurrencyConverterTutorial.pdf (Thanks:-)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: CurrencyConverterTutorial.pdf (Thanks:-)
      • From: Adam Eijdenberg <email@hidden>
  • Prev by Date: Re: NSMenu doc bug?
  • Next by Date: Re: CurrencyConverterTutorial.pdf (Thanks:-)
  • Previous by thread: Re: PB Q
  • Next by thread: Re: CurrencyConverterTutorial.pdf (Thanks:-)
  • Index(es):
    • Date
    • Thread