×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    RStringF creation issue

    Hello,

    I need to create an RStringF object using a string literal, "Busy here". I need to pass this as the second argument to CSIPResponseElements::NewLC(); The signature of CSIPResponseElements::NewLC(); is as follows

    static IMPORT_C CSIPResponseElements *NewLC(TUint aStatusCode, RStringF aReasonPhrase);

    First I create an RStringPool object:
    RStringPool* pool = new RStringPool();

    Now I call CSIPResponseElements::NewLC(), by creating the RStringFobject on the fly by calling OpenFStringL() method of the RStringPool object, by passing const TesC8& as argument. The argument to OpenFStringL() is also created on the fly using _LIT8().
    The code is as follows:
    CSIPResponseElements *pResponseElements = CSIPResponseElements::NewLC(486, pool->OpenFStringL(_LIT8(KResphrase, "Busy Here")));

    I get an expression syntax error for the above line.

    Any suggestions would be appreciated.

    TIA
    Vin

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,684

    Re: RStringF creation issue

    _LIT8 is about defining a literal with a name (the name is KResphrase, the content is "Busy here"). You can not put it inside of an other experssion. Have it in the previous line, and use the name in this one. After 130+ posts you might start thinking about learning a bit more about these things.
    Creating a string "on the fly" would be done with _L8.

  3. #3
    Regular Contributor
    Join Date
    Aug 2010
    Posts
    347

    Re: RStringF creation issue

    Quote Originally Posted by wizard_hu_ View Post
    _LIT8 is about defining a literal with a name (the name is KResphrase, the content is "Busy here"). You can not put it inside of an other experssion. Have it in the previous line, and use the name in this one. After 130+ posts you might start thinking about learning a bit more about these things.
    Creating a string "on the fly" would be done with _L8.
    Well, thanks for pointing it out. Whether it is 130 posts or 1300 posts, we are here as a community to help each other out. And I am sure that after thousands of posts, you don't know many things either.

Similar Threads

  1. Replies: 1
    Last Post: 2010-10-26, 14:04
  2. Access Point creation issue.
    By Comp_users in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2010-03-06, 10:27
  3. Directory Creation Issue on SDCard
    By Hetal_Vora in forum Mobile Java General
    Replies: 4
    Last Post: 2009-10-30, 04:30
  4. File creation issue
    By chandran.biju007 in forum Symbian
    Replies: 1
    Last Post: 2009-07-24, 04:27
  5. RStringF help
    By zwgoal in forum Symbian
    Replies: 0
    Last Post: 2005-11-24, 06:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×