CAknEnumeratedText* enumeratedText = NULL;
CArrayPtr<CAknEnumeratedText> * enumeratedTextArray;
CArrayPtr<HBufC> * poppedUpTextArray;
enumeratedTextArray = new (ELeave) CArrayPtrFlat<CAknEnumeratedText> ( 5);
CleanupStack::PushL( enumeratedTextArray);
poppedUpTextArray = new (ELeave) CArrayPtrFlat<HBufC> ( 5);
CleanupStack::PushL( poppedUpTextArray);
HBufC* selectionText = _L("Selection1").AllocLC();
enumeratedText = new ( ELeave) CAknEnumeratedText( 0, selectionText);
CleanupStack::PushL( enumeratedText);
enumeratedTextArray->AppendL( enumeratedText);
CleanupStack::Pop( enumeratedText);
CleanupStack::Pop( selectionText);
SetEnumeratedTextArrays( enumeratedTextArray, poppedUpTextArray);
SetSelectedIndex( 0);
HandleTextArrayUpdateL();
UpdateListBoxTextL();
CleanupStack::Pop( 2);
CArrayPtr<CAknEnumeratedText> * enumeratedTextArray;
CArrayPtr<HBufC> * poppedUpTextArray;
enumeratedTextArray = new (ELeave) CArrayPtrFlat<CAknEnumeratedText> ( 5);
CleanupStack::PushL( enumeratedTextArray);
poppedUpTextArray = new (ELeave) CArrayPtrFlat<HBufC> ( 5);
CleanupStack::PushL( poppedUpTextArray);
HBufC* selectionText = _L("Selection1").AllocLC();
enumeratedText = new ( ELeave) CAknEnumeratedText( 0, selectionText);
CleanupStack::PushL( enumeratedText);
enumeratedTextArray->AppendL( enumeratedText);
CleanupStack::Pop( enumeratedText);
CleanupStack::Pop( selectionText);
SetEnumeratedTextArrays( enumeratedTextArray, poppedUpTextArray);
SetSelectedIndex( 0);
HandleTextArrayUpdateL();
UpdateListBoxTextL();
CleanupStack::Pop( 2);