This should be *really* obvious, but it ain’t to me.
I have a popUpButton with years from 1990 to a wee way ahead. I want to populate each row with the year description and found this was the easiest way for me to do it. But it can’t be the best. Or easiest.
// Populate the year button until two years in the future.
for (i = 1990; i < [now yearOfCommonEra] + 4; i++)
{
// There should be, and probably is, a straight-forward casting method for
// integer->char...
[yearButton addItemWithTitle:[NSString stringWithFormat:@"%i", i]];
[[yearButton lastItem] setTag:i];
}
How change I implement the addItemWithTitle without going through the indirect stringWithFormat cast? I suppose I could slip atoi() in there, but is there an Objective-C way of going about it? I know exactly how to do it in SAS/AF Frame, but there’s no such beast under OS X.
I’m learning all the time… ![]()
<font size=-1>[ This Message was edited by: LaurieF on 2002-02-15 20:30 ]</font>



11” MacBook Air 1.6GHz dual-core Intel Core i5: $829.00 Delivered
Samsung S22B300B 21.5” LED Backlit LCD Monitor: $129.99 Delivered
Canon imageCLASS Monochrome Multifunction Laser Printer: $129.99 Delivered
