×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:AknTextUtils::WrapToArrayL() does not accept literals (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search
 
hamishwillee (Talk | contribs)
m (Hamishwillee - Fix categories)
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Symbian C++]]
+
[[Category:Symbian C++]][[Category:Known Issue]][[Category:S60 3rd Edition (initial release)]][[Category:S60 3rd Edition FP1]][[Category:UI]]
[[Category:Known Issue]]
+
{{Archived|timestamp=20120223111305|user=roy.debjit| }}
[[Category:S60 3rd Edition]]
+
[[Category:S60 3rd Edition, Feature Pack 1]][[Category:For publishing]]
+
{{KBKI}}
+
__NOTOC__
+
__NOEDITSECTION__
+
{|style="background:#eceff2" width="660px" border="1" cellpadding="5" cellspacing="0"
+
|-
+
|'''ID''' ||KIS001069
+
|'''Creation date''' ||August 7, 2008
+
|-
+
|'''Platform''' ||S60 3rd Edition, S60 3rd Edition, FP1
+
|'''Devices Tested''' || Nokia N95, Nokia E90 Communicator, Nokia N73
+
|-
+
|'''Category''' ||Symbian C++
+
|'''Subcategory''' ||-
+
|}
+
  
==Description==
+
{{Abstract|{{Icode|AknTextUtils::WrapToArrayL()}} exits with {{Icode|KERNEXEC 3}} panic when a literal (such as {{Icode|_L("")}} or {{Icode|_LIT("")}}) is passed as a parameter. It works fine if a descriptor other than a literal is passed. (e.g. {{Icode|TBuf}}, {{Icode|HBuf}}, {{Icode|TLitC}}). }}
  
<tt>AknTextUtils::WrapToArrayL() </tt> exits with KERNEXEC 3 panic when a literal (such as _L("") or _LIT("")) is passed as a parameter. It works fine if a descriptor (such as TBuf, HBuf, TLitC) other than a literal is passed.
+
{{ArticleMetaData <!-- v1.2 -->
 +
|sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] -->
 +
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 +
|devices= Nokia N95, Nokia E90 Communicator, Nokia N73
 +
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
 +
|platform= S60 3rd Edition, S60 3rd Edition FP1
 +
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
 +
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
 +
|signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
 +
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 +
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 +
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 +
|translated-by= <!-- [[User:XXXX]] -->
 +
|translated-from-title= <!-- Title only -->
 +
|translated-from-id= <!-- Id of translated revision -->
 +
|review-by= <!-- After re-review: [[User:username]] -->
 +
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 +
|update-by= <!-- After significant update: [[User:username]]-->
 +
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 +
|creationdate= 20080807
 +
|author= [[User:Technical writer 1]]
 +
<!-- The following are not in current metadata -->
 +
|id= KIS001069
 +
}}
  
 
== How to reproduce ==
 
== How to reproduce ==
  
1. Declare and initialize a TRect object.<br>
+
# Declare and initialize a {{Icode|TRect}} object.
2. Declare and initialize a const CFont object and use the following lines of code.
+
# Declare and initialize a {{Icode|const CFont}} object and use the following lines of code.
 
+
#: <code cpp>
    CArrayFix<TPtrC>* array = new (ELeave)CArrayFixFlat<TPtrC>( 1 );
+
CArrayFix<TPtrC>* array = new (ELeave)CArrayFixFlat<TPtrC>( 1 );
    CleanupStack::PushL( array );
+
CleanupStack::PushL( array );
    AknTextUtils::WrapToArrayL( _L( "Foo" ), aRect.Width(), *aFont, *array );
+
AknTextUtils::WrapToArrayL( _L( "Foo" ), aRect.Width(), *aFont, *array );
 +
</code>
  
 
This works fine if the following lines of code are used:
 
This works fine if the following lines of code are used:
 
+
<code cpp>
    _LIT(KBuf,"Foo");
+
_LIT(KBuf,"Foo");
    TBuf<10> buf = KBuf;
+
TBuf<10> buf = KBuf;
    CArrayFix<TPtrC>* array = new (ELeave)CArrayFixFlat<TPtrC>( 1 );
+
CArrayFix<TPtrC>* array = new (ELeave)CArrayFixFlat<TPtrC>( 1 );
    CleanupStack::PushL( array );
+
CleanupStack::PushL( array );
    AknTextUtils::WrapToArrayL( buf, aRect.Width(), *aFont, *array );
+
AknTextUtils::WrapToArrayL( buf, aRect.Width(), *aFont, *array );
 +
</code>
  
 
==Solution==
 
==Solution==
  
 
No solution exists.
 
No solution exists.
 +
 +
<!-- Translation --> [[zh-hans:AknTextUtils::WrapToArrayL()不接收字母参数]]

Latest revision as of 03:34, 7 August 2012

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

AknTextUtils::WrapToArrayL() exits with KERNEXEC 3 panic when a literal (such as _L("") or _LIT("")) is passed as a parameter. It works fine if a descriptor other than a literal is passed. (e.g. TBuf, HBuf, TLitC).

Article Metadata
Tested with
Devices(s): Nokia N95, Nokia E90 Communicator, Nokia N73
Compatibility
Platform(s): S60 3rd Edition, S60 3rd Edition FP1
S60 3rd Edition FP1
S60 3rd Edition (initial release)
Article
Created: User:Technical writer 1 (07 Aug 2008)
Last edited: hamishwillee (07 Aug 2012)

[edit] How to reproduce

  1. Declare and initialize a TRect object.
  2. Declare and initialize a const CFont object and use the following lines of code.
    CArrayFix<TPtrC>* array = new (ELeave)CArrayFixFlat<TPtrC>( 1 );
    CleanupStack::PushL( array );
    AknTextUtils::WrapToArrayL( _L( "Foo" ), aRect.Width(), *aFont, *array );

This works fine if the following lines of code are used:

_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 );

[edit] Solution

No solution exists.

This page was last modified on 7 August 2012, at 03:34.
160 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×