On Jan 2, 2011, at 6:10 PM, Stephen J. Butler wrote: > - Charles asks 'why the @""' and I can answer that question: because > you couldn't figure out another way to call stringByAppendingFormat: > could you? The answer is that in this case you should be calling > +[NSString stringWithFormat:]. However...
Ah — my assumption was that he wanted to keep appending previous results to the string, so it’d create sort of a log file sort of thing (or, since his object is a calculator, something akin to a roll of tape on an adding machine). In this case, using -stringByAppendingString: (or just using an NSMutableString) would be correct, although the assignment to an empty string would be wrong. Charles_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com