Combo Box Array question.

Login to reply to this topic.
Thu, 2005-04-14 05:00
Joined: 2004-08-25
Forum posts: 32
Hi all,

I have tried to create a combo box and I want to build the array dynamically, therefore I use the function SetArray of CEikComboBox.

Following is my code:

CCoeControl* myControlPtr = this->Control(EMyComboBoxControlId);
CEikComboBox* myComboBox = static_cast<CEikComboBox*>(myControlPtr);

CDesC16Array* iArray;

_LIT(KText1,"text 1");
const TDesC16& txt1 = KText1;

iArray->AppendL(txt1);

myComboBox->SetArray(iArray);

When the code run to the line iArray->AppendL(), then it will return error with error code E32UserCBase 8. I have checked from the UIQ document. It says it is the length problem of the Array.

I really have no idea how to solve this problem. Can anyone help me?

Thanks,
Vincent
  • Login to reply to this topic.