суть проблемы в следующем:
создаю меню (пробовал и с ресурсов, и динамически). Но когда делаем клик на нем, чтобы выбрать другой элемент из CAknEnumeratedTextPopupSettingItem, то получаю ошибку kern exec 3. уже все перебрал, не пойму, что не так (что не инициализировано). Другой элемент Текстовое поле работает полностью нормально. пишу под S60 3rd Edition.
вот код динамического создания списка
очень надеюсь на Вашу помощь.Code:void CTestTaskContainer::ConstructL(const TRect& aRect) { // Create a window for this application view CreateWindowL(); iItemList = new (ELeave) CAknSettingItemList; iItemList->SetMopParent(this); iItemList->ConstructFromResourceL(R_ENTRY_SETTINGS_LIST); //BaseConstructL(CAknAppUi::EAknEnableSkin); LoadListL(); iItemList->MakeVisible(ETrue); iItemList->SetRect(aRect); iItemList->ActivateL(); iItemList->ListBox()->UpdateScrollBarsL(); iItemList->DrawNow(); // Set the windows size SetRect(aRect); // Activate the window, which makes it ready to be drawn ActivateL(); } void CTestTaskContainer::LoadListL() { /*Enumerated text setting item*/ CAknEnumeratedTextPopupSettingItem* item9 = new (ELeave) CAknEnumeratedTextPopupSettingItem(9, iEnumText); CleanupStack::PushL(item9); // The same resource id can be used for multiple enumerated text setting pages. item9->ConstructL(isNumberedStyle, 9, KName9, icons, R_ENUMERATEDTEXT_SETTING_PAGE, -1, 0, R_POPUP_SETTING_TEXTS); // Load texts dynamically. CArrayPtr<CAknEnumeratedText>* texts = item9->EnumeratedTextArray(); texts->ResetAndDestroy(); CAknEnumeratedText* enumText; // Text 1 HBufC* text = KEnumText1().AllocLC(); enumText = new (ELeave) CAknEnumeratedText(0, text); CleanupStack::Pop(text); CleanupStack::PushL(enumText); texts->AppendL(enumText); CleanupStack::Pop(enumText); // Text 2 text = KEnumText2().AllocLC(); enumText = new (ELeave) CAknEnumeratedText(1, text); CleanupStack::Pop(text); CleanupStack::PushL(enumText); texts->AppendL(enumText); CleanupStack::Pop(enumText); iItemList->SettingItemArray()->AppendL(item9); CleanupStack::Pop(item9); // Required when there is only one setting item. iItemList->SettingItemArray()->RecalculateVisibleIndicesL(); iItemList->HandleChangeInItemArrayOrVisibilityL(); }

Reply With Quote

