Hey,

How to change the names of the CAknEnumeratedTextPopupSettingItem dynamically with right way? I notice the following:

If I use the code below and put to variables newAName and newANameBuffer value that is allocated from pointer or not _L("jejej") or text from resources I can't get the UI to work properly. The o before the name of the item in the list is not shown.

Like this:

group 1
group 2

Should be:
o group 1
o group 2

CAknEnumeratedTextPopupSettingItem* aSettingItem = NULL;
// Get the reference to array.
CDesCArray* aArray = iModel.GetSortedArrayL();
// Create new array for.
CArrayPtr<CAknEnumeratedText>* array =
new( ELeave ) CArrayPtrFlat<CAknEnumeratedText>( 1 );
// Create new array for
CArrayPtr<HBufC>* desArray = new( ELeave ) CArrayPtrFlat<HBufC>( 1 );
// Get the item
aSettingItem = static_cast< CAknEnumeratedTextPopupSettingItem* >
( settingItemArray->operator[]( 3 ) );
// Go through the array.
for( TInt gindex( 0 ); gindex < aArray->Count(); gindex++ )
{
// Get the items name.
HBufC* newAName = aArray->operator[]( gindex ).AllocL();
CAknEnumeratedItem<HBufC>* addItem =
new( ELeave ) CAknEnumeratedItem<HBufC>( gindex, newAName );
// Append to array a one item.
array->AppendL( addItem, 1 );
HBufC* newANameBuffer = aArray->operator[]( gindex ).AllocL();
// Append to array a one item.
desArray->AppendL( newANameBuffer, 1 );
}

// Add the arrays to setting item.
aSettingItem->SetEnumeratedTextArrays( array, desArray );
// Set the text incase that we don't have any items.
aSettingItem->SetEmptyItemTextL( *noItems );

aArray->Reset();
delete aArray;
aArray = NULL;

Thanks, Rampe