×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Mar 2006
    Location
    India
    Posts
    138

    Angry PANIC EXEC 3 while including CAknEnumeratedTextPopupSettingItem into a form

    Hi guys,
    I have also done the coding according to your suggestions. And I avoied the CONE 14 panic. but now I have started to have panic like KERN EXEC 3.
    I m including the setting list into the dialog box code is like given below:

    RSS code:

    RESOURCE DIALOG r_mydialog
    {
    flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect |
    EEikDialogFlagWait | EEikDialogFlagCbaButtons | EEikDialogFlagNoTitleBar;

    buttons = R_AVKON_SOFTKEYS_SELECT_CANCEL

    items =
    {
    DLG_LINE
    {
    // **** This is the control type - its our own special custom control ****
    type = EAknCtLastControlId
    id = ESLIList;
    control = AVKON_SETTING_ITEM_LIST
    {
    flags = EAknSettingItemNumberedStyle;
    title = "Setting Item List Sample";
    initial_number = 1;
    items =
    {
    AVKON_SETTING_ITEM
    {
    identifier = EAknExSettingPopup;
    setting_page_resource = r_popup_setting _page;
    associated_resource = r_popup_setting_texts;
    name = "Settings2";
    }

    };
    };
    }
    };

    }


    RESOURCE POPUP_SETTING_LIST r_enumerated_text_setting_other_editor
    {
    flags = 0;
    }

    RESOURCE AVKON_SETTING_PAGE r_popup_setting_page
    {
    //number= 1;
    //label= "Setting";
    //hint_text = "Select";
    type = EAknCtPopupSettingList;
    editor_resource_id = r_enumerated_text_setting_other_editor;
    }

    RESOURCE AVKON_POPUP_SETTING_TEXTS r_popup_setting_texts
    {
    //flags = 0;
    setting_texts_resource = r_enumerated_texts_array;
    popped_up_texts_resource = r_popped_up_text_array;
    }

    RESOURCE ARRAY r_enumerated_texts_array
    {
    items =
    {
    AVKON_ENUMERATED_TEXT { value=0; text = "first"; },
    AVKON_ENUMERATED_TEXT { value=1; text = "second"; },
    /* AVKON_ENUMERATED_TEXT { value=2; text = "qtn_third"; },
    AVKON_ENUMERATED_TEXT { value=3; text = "qtn_fourth"; }*/

    };
    }

    RESOURCE ARRAY r_popped_up_text_array
    {
    items =
    {
    LBUF { txt = "first"; },//qtn_exsl_texts_enabled
    LBUF { txt = "second"; },//qtn_exsl_texts_disabled
    /* LBUF { txt = "qtn_third"; },
    LBUF { txt = "qtn_fourth"; }*/

    };
    }


    CPP code:

    To create setting list item:
    TInt index = 0;
    CAknSettingItem* CSettingItemList::CreateSettingItemL(TInt aIdentifier)
    {
    CAknSettingItem* settingitem = NULL;
    iFlag = ETrue;

    switch (aIdentifier)
    {
    case EAknExSettingPopup:
    {
    settingitem = new (ELeave) CAknEnumeratedTextPopupSettingItem(aIdentifier, index);
    }
    break;
    }

    return settingitem;
    }

    SEikControlInfo CMyForm::CreateCustomControlL(TInt aControlType)
    {
    __ASSERT_ALWAYS(aControlType == EAknCtLastControlId, User::Panic(KModule, KErrArgument));

    iSettingsList = new (ELeave) CSettingItemList;

    SEikControlInfo controlInfo;
    controlInfo.iFlags = EEikControlHasEars;
    controlInfo.iTrailerTextId = 0;
    controlInfo.iControl = iSettingsList;
    STATIC_CAST(CSettingItemList*, controlInfo.iControl)->SetContainerWindowL(*this);

    return controlInfo;
    }


    CMyForm::TFormControlTypes CMyForm::ConvertCustomControlTypeToBaseControlType(TInt aControlType) const
    {
    __ASSERT_ALWAYS(aControlType == EAknCtLastControlId, User::Panic(KModule, KErrArgument));

    return EPopfieldDerived;
    }

    void CMyForm::PostLayoutDynInitL()
    {
    _LIT(KItem2, "Item 2 data");
    iSettingsList->iText2 = KItem2;
    iSettingsList->LoadSettingsL();
    }

    TBool CMyForm::OkToExitL(TInt aButtonId)
    {
    if (aButtonId == EAknSoftkeySelect)
    {
    const TInt current = iSettingsList->ListBox()->CurrentItemIndex();
    iSettingsList->EditItemL(current, EFalse);
    }


    //Execution of the dialog
    CMyForm* myForm = CMyForm::NewLC();

    myForm->ExecuteLD(R_MYDIALOG);


    Please help
    Thanks
    -Anand

  2. #2
    Super Contributor
    Join Date
    Jul 2005
    Posts
    1,686

    Re: PANIC EXEC 3 while including CAknEnumeratedTextPopupSettingItem into a form

    check out construction and deconstruction whether new and delete is not match.

Similar Threads

  1. Replies: 2
    Last Post: 2007-07-19, 01:29
  2. PANIC EXEC 3 while using a popup field into selection list mode.
    By anand_zain76 in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-05-15, 09:30
  3. What does FORM Panic 321 mean?
    By gravana in forum Symbian
    Replies: 0
    Last Post: 2004-10-14, 00:27
  4. panic USER EXEC 3
    By kustom in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2004-01-27, 03:13
  5. Does anyone know what FORM Panic 25 refers to?
    By Nokia_Archive in forum Symbian
    Replies: 1
    Last Post: 2002-06-03, 02:06

Posting Permissions

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