At 12:00am -0800 00-02-13, Palm Developer Forum digest wrote:
>Subject: Re: BUG in 3.0.2 (^1^2^3 in custom alerts)
>From: "Richard Burmeister" <[EMAIL PROTECTED]>
>Date: Sat, 12 Feb 2000 10:50:47 -0600
>X-Message-Number: 10
>
>"Paul Nevai" wrote:
>
> > Make an alert with "^1^2^3" in it and then do this:
> > FrmCustomAlert (MyGenericAlert, "a", "", "");
>
>This issue has previously been discussed. The solution is to pass strings
>containing a single blank, rather than 0-length strings for the unused
>parameters.
>
>Another solution (the one I personally prefer, but others may disagree) is
>to only use one replaceable string (^1) in the alert form and to use
>StrPrintF to build the string. This has the advantage of allowing any
>number of string replacements. For example:
>
>StrPrintF( msg, "Thank you for registering, %s!\n\nYour code is %s", name,
>code );
>FrmCustomAlert( GeneralAlert, msg, NULL, NULL );
That would work, though now you've got a hard-coded string in your
code, which can't easily be localized. If you are going to use
StrPrintF, it would be good to load the template from a tSTR resource.
-- Ken
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html