×
Namespaces

Variants
Actions
Revision as of 03:35, 7 August 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

AknTextUtils::WrapToArrayL()不接收字母参数

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata

兼容于
平台: S60 3rd Edition, S60 3rd Edition, FP1
S60 3rd Edition FP1
S60 3rd Edition (initial release)

文章
翻译:
hoolee
最后由 hamishwillee 在 07 Aug 2012 编辑
  • 详细描述

如果AknTextUtils::WrapToArrayL()的参数为字母(如_L("")或_LIT(""))那么就会抛出KERNEXEC 3异常。如果是其他描述符如TBuf, HBuf或TLitC那么将正常运行。


  • 如何重演
  1. 描述并初始化一个TRect对象
  2. 描述并初始化一个const CFont对象,并运行下列代码:
   CArrayFix<TPtrC>* array = new (ELeave)CArrayFixFlat<TPtrC>( 1 );
CleanupStack::PushL( array );
AknTextUtils::WrapToArrayL( _L( "Foo" ), aRect.Width(), *aFont, *array );

如果使用下列代码将正常工作

   _LIT(KBuf,"Foo");
TBuf<10> buf = KBuf;
CArrayFix<TPtrC>* array = new (ELeave)CArrayFixFlat<TPtrC>( 1 );
CleanupStack::PushL( array );
AknTextUtils::WrapToArrayL( buf, aRect.Width(), *aFont, *array );


  • 解决方案

暂无解决方案

This page was last modified on 7 August 2012, at 03:35.
86 page views in the last 30 days.
×