• 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
Re: Localized alert function?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Localized alert function?


  • Subject: Re: Localized alert function?
  • From: Stéphane Sudre <email@hidden>
  • Date: Tue, 25 Nov 2003 23:19:12 +0100

On mardi, novembre 25, 2003, at 08:24 PM, Darrin Cardani wrote:

At 7:33 PM +0100 11/25/03, Stiphane Sudre wrote:
I don't see the issue, what prevents you from doing this?

NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"I used to find ^1 was clever but since I discovered %@, it changed my life.", @"Description forthcoming"),@"ResEdit is prehistoric"],etc...

Nothing prevents me from doing it. It's just that 6 potential function calls instead of 1 or 2 seems like a hassle to write out every time. So instead of doing this (in the simple case with no replacement necessary):

StopAlert (kDescriptive_ALRT_ID, NULL);

I now have to do this:

NSRunAlertPanel(NSLocalizedString(@"I wish I got paid by the character to program, but I don't", @"What is this unused comment for again?"), NSLocalizedString(@"Now the somewhat descriptive message", @"And another unused comment here"), nil, nil, nil);

I'd rather read my version than yours. Don't get me wrong, I like the localized string mechanism in general. I just think it's way overkill for this. But if that's the standard way to do it, I'll do it that > way.

Hum, then maybe one workaround can be to write a Macro around NSRunAlertPanel.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: Localized alert function? (From: Darrin Cardani <email@hidden>)

  • Prev by Date: Re: NSArrayController array-observation
  • Next by Date: Re: Stupid question: Flood Fill
  • Previous by thread: Re: Localized alert function?
  • Next by thread: New build phase...
  • Index(es):
    • Date
    • Thread