On 1/20/06 7:19 AM, Alexey Proskuryakov didst favor us with:
> On 20.01.2006 15:11, "Douglas Norton" <email@hidden> wrote:
>
>>> Probably because it's hard to make an example of when such a function could
>>> be used? At least, I'm at a loss - almost any mutation of a localized
>>> string may break its correctness.
>>
>> When the string is: "Progress: Copying files (_numfile_ of
>> _totalfiles_)"
>>
>> or a window title: "Font usage: _documenttitle_"
>
> I don't buy this example - it's much easier to use format strings (%d, %s
> etc) and CFStringCreateWithFormat().
I'm not sure it's your place to "buy" this. The point is simply that it's
entirely possible to have a use for a mutable string that's stored in a
localized strings file. The fact that it's an approach you wouldn't use
yourself doesn't invalidate its use.
> Format strings even support reordering of arguments.
When would you use this with localized strings?
The use of format strings is a fine mechanism, but in my case I use the same
system I implemented back when I was using Pascal, before format strings
were even an option. It still works fine, so I have better things to do (and
more valuable things to modernize) than go through all of my strings and
supporting code to do a conversion to format strings, and then test it all.
Granted, it would be a lot less painful now that I'm using strings files
than it would have been back when I was using 'STR#' resources, but with
more than 1800 strings now it would still be a major undertaking that won't
increase the value of my product at all since users don't care about
something like this. This places it firmly in the "If it ain't broke, don't
fix it" category.
Larry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden