Discussion Board

Results 1 to 6 of 6

Thread: CItemArray

  1. #1
    Registered User marvik_34's Avatar
    Join Date
    Jun 2006
    Posts
    259
    Hi,

    My application gets data items (names) from sever dynamically, recevies more than 50 data items.Data is added to menu items. When the user clicks on the particular item it performs certain operation.
    For single item
    _LIT(KName,"One");
    TBuf<10> bufOne(KName);
    CEikMenuPaneItem::SData itemOne;
    itemOne.iCommandId = EDemoOne;
    itemOne.iCascadeId = 0;
    itemOne.iFlags = 0;
    itemOne.iText = bufOne;
    aMenuPane->AddMenuItemL(itemOne);

    Using CEikMenuPane::CItemArray how to add items dynamically?
    How to assign CommandID to the menu item at runtime and click events (handle command like) for that item?

    Thanx in advance.
    Cheers
    Last edited by marvik_34; 2006-11-13 at 09:16.

  2. #2
    Registered User marvik_34's Avatar
    Join Date
    Jun 2006
    Posts
    259
    Any Solution?
    cheers

  3. #3
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Where is the question? If your snipet works, you can add items with different iCommandId-s, and you will get them in your HandleCommandL.

  4. #4
    Registered User marvik_34's Avatar
    Join Date
    Jun 2006
    Posts
    259
    Hi Wizard,
    Thankyou for replay. This code snippet is for one item. I want to wright a code for more than 50 items. When each item clicked it performs asynchronous operations
    How to wright a code using CEikMenuPane::CItemArray to display item dynamically? How to assign the iCommandIDs to these items dynamically? Bit wired up, help me.

    Cheers

  5. #5
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Have you heard about loops?
    Some examples: "for" "while" "do...while"
    You can assign iCommandId-s based on the highest ID you use in your static menu structure (actually starting with "EHighestID+1" to avoid duplication).

  6. #6
    Registered User marvik_34's Avatar
    Join Date
    Jun 2006
    Posts
    259
    Thankyou very much
    cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved