Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > OOP Powerplant for Mac > Re: How to disp...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 443 of 484
Post > Topic >>

Re: How to display StandardAlert in Powerplant while localization

by Stephen Chu <stephen@[EMAIL PROTECTED] > Mar 2, 2006 at 11:28 AM

In article <1141309309.365829.74710@[EMAIL PROTECTED]
>,
 "Neel" <nilesh_ibmr@[EMAIL PROTECTED]
> wrote:

> Hi
>     Trying to display StandardAlert in Powerplant while localization.
> Want to display simplified chinese string .i.e.Str255 dst =
> "\p总阈值"; which is already converted to UTF8, using XCODE
> IDE. The original en string is "Global Threshold".  Now I am trying to
> display it using StandardAlert in PP, but it does not display any
> characters at all....Have a look at the following code snippet....
> 
>
******************************************************************************
> AlertStdAlertParamRec SARecord;
> SInt16* outItemHit;
> Str255 dst = "\p总阈值";
> 
> CFStringRef cfS  = NULL;
> SARecord.filterProc = nil;
> SARecord.movable = true;
> SARecord.helpButton = false;
> SARecord.defaultText = "\pYes";;
> SARecord.otherText = "\pNo";;
> SARecord.cancelText = "\pCancel";;
> SARecord.defaultButton = kAlertStdAlertOKButton;
> SARecord.cancelButton = kAlertStdAlertCancelButton;
> SARecord.position = kWindowDefaultPosition;
> 
> cfS = CFStringCreateWithPascalString(kCFAllocatorDefault, dst,
> kCFStringEncodingUTF8);
> ConstStringPtr uStr = CFStringGetPascalStringPtr(cfS,
> CFStringGetSystemEncoding());
> 
> ::StandardAlert(kAlertNoteAlert,"\pUnicode Message" ,uStr, &SARecord,
> outItemHit);
>
******************************************************************************
> **************************
> 
> 
> Thanks for all help.
> Regards,
> Neel

Check out CreateStandardAlert and RunStandardAlert. They use CFString 
instead of pascal strings.
 




 4 Posts in Topic:
How to display StandardAlert in Powerplant while localization
"Neel" <nile  2006-03-02 06:21:49 
Re: How to display StandardAlert in Powerplant while localizatio
Stephen Chu <stephen@[  2006-03-02 11:28:22 
Re: How to display StandardAlert in Powerplant while localizatio
"Neel" <nile  2006-03-08 06:43:22 
Re: How to display StandardAlert in Powerplant while localizatio
"Neel" <nile  2006-03-09 21:04:43 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 10:08:12 CST 2008.