×

Discussion Board

Results 1 to 2 of 2
  1. #1
    chishti.hameed
    Guest

    problem with extracting part of string :-(

    In my settinglist i've string like this: First Part: Second Part
    Down Under is code where i'm trying to extract "Second Part" of string.

    when (index = 0) it works good. but in all other cases i get smth like this:

    art: Second Part
    s Part: Second Part
    rst Part: Second Part

    e.t.c......

    All these items in settinglist are ENUMERATED_TEXT

    HBufC* aText;

    if (aIndex == 0)
    {
    aText = (*SettingItemArray())[0]->ListBoxText();
    TPtr ptrText = aText->Des();
    TChar ch = ':';
    TInt colon = ptrText.Locate(ch);
    TPtrC ptrTextC = ptrText.Right(colon+1);
    aBuf.Zero();
    aBuf.Copy(ptrTextC);
    CEikonEnv::InfoWinL(_L("aBuf "), ptrTextC);
    aBuf.TrimAll();
    }

    if (aIndex ==1)
    {
    aText = (*SettingItemArray())[1]->ListBoxText();
    TPtr ptrText = aText->Des();
    TChar ch = ':';
    TInt colon = ptrText.Locate(ch);
    TPtrC ptrTextC = ptrText.Right(colon+1);
    aBuf.Zero();
    aBuf.Copy(ptrTextC);
    CEikonEnv::InfoWinL(_L("aBuf "), ptrTextC);
    aBuf.TrimAll();
    }

  2. #2
    chishti.hameed
    Guest
    here is what i've in .rss



    RESOURCE AVKON_POPUP_SETTING_TEXTS r_optionon1radiobtn_page_texts
    {
    setting_texts_resource = r_optionon1radiobtn_item_texts;
    popped_up_texts_resource = r_optionon1radiobtn_editor_texts;
    }

    RESOURCE ARRAY r_optionon1radiobtn_item_texts
    {
    items =
    {
    AVKON_ENUMERATED_TEXT
    {
    value = 0;
    text = "One";
    },
    AVKON_ENUMERATED_TEXT
    {
    value = 1;
    text = "Two";
    },
    AVKON_ENUMERATED_TEXT
    {
    value = 2;
    text = "Three";
    }
    };
    }

    RESOURCE ARRAY r_optionon1radiobtn_editor_texts
    {
    items =
    {
    LBUF { txt = "Option One"; },
    LBUF { txt = "Option Two"; },
    LBUF { txt = "Option Three"; }
    };
    }



    RESOURCE AVKON_POPUP_SETTING_TEXTS r_srcradiobtn_page_texts
    {
    setting_texts_resource = r_srcradiobtn_item_texts;
    popped_up_texts_resource = r_srcradiobtn_editor_texts;
    }

    RESOURCE ARRAY r_srcradiobtn_item_texts
    {
    items =
    {
    AVKON_ENUMERATED_TEXT
    {
    value = 0;
    text = "Source One";
    },
    AVKON_ENUMERATED_TEXT
    {
    value = 1;
    text = "Source Two";
    },
    AVKON_ENUMERATED_TEXT
    {
    value = 2;
    text = "Source Three";
    }
    };
    }

    RESOURCE ARRAY r_srcradiobtn_editor_texts
    {
    items =
    {
    LBUF { txt = "Source One";},
    LBUF { txt = "Source Two"; },
    LBUF { txt = "Source Three"; }
    };
    }

Posting Permissions

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