• 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
Currency Converter sample [rateField selectText:self]; doesn't work...?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Currency Converter sample [rateField selectText:self]; doesn't work...?


  • Subject: Currency Converter sample [rateField selectText:self]; doesn't work...?
  • From: Lloyd Sargent <email@hidden>
  • Date: Mon, 16 Jul 2001 11:08:58 -0500

On Sunday, July 15, 2001, at 05:22 PM, email@hidden wrote:

Hey,
Learning Cocoa book (1st ed), page 122 in the code for the method
convert:


-(IBAction)convert:(id)sender
{
float rate, amt, total;

amt = [dollarField floatValue];
rate = [rateField floatValue];

total = [converter convertAmount:amt atRate:rate];

[totalField setFloatValue:total];
[rateField selectText:self]; // THIS LINE DOESN'T SEEM TO WORK
}


The last line doesn't seem to work: [rateField selectText:self];

I do not see the rate field get selected. Is this a "Known Bug" in
NSTextField (or some such)? Or a badly written sample? What is the
proper way to change the active text field in the UI if this isn't it?

Thanks in advance,
tyler

Well, I'm not sure what to tell you. I seem to get a correctly working program using the code from the Cocoa book, so I don't think it is a "known bug". Nor do I think it is a badly written sample.

Does the program work other than just not selecting the rateField? Anything odd happen during execution?

Cheers,

Lloyd
-----
Canna Software Development
"No animals were harmed in the creation of this email, however some routers suffered painful bumps and bruises."


OS X Release Version - As Good As It Gets!


  • Prev by Date: Problem with beinSheet, endSheet
  • Next by Date: Quality of WWDC 2001 ADC-TV?
  • Previous by thread: Re: Problem with beinSheet, endSheet [solution]
  • Next by thread: Quality of WWDC 2001 ADC-TV?
  • Index(es):
    • Date
    • Thread