Currency Converter sample [rateField selectText:self]; doesn't work...?
Currency Converter sample [rateField selectText:self]; doesn't work...?
- Subject: Currency Converter sample [rateField selectText:self]; doesn't work...?
- From: tyler <email@hidden>
- Date: Sun, 15 Jul 2001 13:31:39 -0700
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