×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    58

    How to use CAknMarkableListDialog HELP

    Hi all,

    I am trying to code a Markable List Box dialog as mentioned in the SDK documentation AknSelectionLists.h. I want to build a File List Select dialog which can mark and select a set of files and download all the files from a server. But my example does not work. Can someone tell me what is wrong with my code.


    STEP 1:

    I created the .rss file with the following:

    // resource definition for this class:
    RESOURCE DIALOG r_res_id_for_a_dialog
    {
    flags = EAknDialogMarkableList;
    buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
    items =
    {
    DLG_LINE
    {
    type = EAknCtSingleGraphicListBox;
    id = ESelectionListControl;
    control = LISTBOX
    {
    flags = EAknListBoxMarkableList;
    };
    }
    };
    }


    RESOURCE MENU_BAR r_res_id_for_a_menubar
    {
    titles =
    {
    MENU_TITLE { menu_pane = R_AVKON_MENUPANE_MARKABLE_LIST; }
    };
    }



    The following code has been added to the CMyAppUI. I guess i am doing everything the series60 documentation says.


    case EListTutor2CmdAppTest:
    {
    iEikonEnv->InfoMsg(_L("test"));
    items = new (ELeave) CDesCArrayFlat(4);
    items->AppendL(_L("Item 1"));
    items->AppendL(_L("Item 2"));
    items->AppendL(_L("Item 3"));
    items->AppendL(_L("Item 4"));

    CleanupStack::PushL(items);
    MDesCArray *arrayOfItems = items;
    CArrayFix<TInt> *selectedItems = new (ELeave)CArrayFixFlat<TInt>(4);
    CleanupStack::PushL(selectedItems);
    CAknMarkableListDialog *dialog = CAknMarkableListDialog::NewL(openedItem, selectedItems, arrayOfItems, R_RES_ID_FOR_A_MENUBAR);

    TInt result = dialog->ExecuteLD(R_RES_ID_FOR_A_DIALOG);

    if (result) { } else { }

    CleanupStack::PopAndDestroy(2);
    delete dialog;
    break;
    }


    The code crashes on executing dialog->ExecuteLD

    My advance thanks to anyone who can help..

    murali

  2. #2
    Regular Contributor
    Join Date
    Apr 2003
    Posts
    52
    Hi
    If u change items->AppendL(_L("Item 1"));
    to items->AppendL(_L("0\t Item 1\t0 ")); it will work

    but Do u have any idea to change default icom


    meenuj

Posting Permissions

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