CAknSelectionListDialog

Login to reply to this topic.
Wed, 2005-05-18 11:38
Joined: 2005-02-21
Forum posts: 47
Hi, I'm doing an exact copy from Series60 SDK help of CAknSelectionListDialog and it just gives me User 0 panic on emulator and KERN-EXEC 3 on device. What the heck?

I'll bring the code here but I remind you - it is almost (sic!) exact replica of the one brought in help:

resource:
RESOURCE DIALOG r_searching_dialog
{
   flags = EAknDialogSelectionList;
   buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
   items =
   {
      DLG_LINE
      {
         type = EAknCtSingleListBox;
         id = ESearchingDialogListBox;
         control = LISTBOX
         {
            flags = EAknListBoxSelectionList;
         };
      }
   };
}
RESOURCE MENU_BAR r_searching_dialog_menubar
{
   titles =
   {
      MENU_TITLE
      { menu_pane = R_AVKON_MENUPANE_SELECTION_LIST; }
   };
}


usage:
TInt openedItem = 0;
CDesCArray *arr = new CDesCArrayFlat(5);
/* no items -> should dislpay "no data" listbox */
CAknSelectionListDialog *dlg = CAknSelectionListDialog::NewL(
openedItem, arr, R_SEARCHING_DIALOG_MENUBAR );
dlg->ExecuteLD( R_SEARCHING_DIALOG );


and the last line panics. I've spent 2hrs on this already and have still no idea what's wrong

regards,
 Ahti.

Sat, 2005-05-21 12:06
Joined: 2005-03-31
Forum posts: 173
Re: CAknSelectionListDialog
Code:
CDesCArrayFlat* array=new (ELeave) CDesCArrayFlat(3);
CleanupStack::PushL(array);
-
-
-
-
CleanupStack::PopAndDestroy(array);

Mon, 2005-05-23 10:58
Joined: 2005-02-21
Forum posts: 47
Re: CAknSelectionListDialog
yes, your point is correct regarding mem-leak possibility there. But it did not affect the panic Smiley
Fri, 2007-04-27 14:27
Joined: 2005-02-11
Forum posts: 10
Re: CAknSelectionListDialog
  • Login to reply to this topic.