Getting User-130 in ListBox Construction in the third level view....

Login to reply to this topic.
Fri, 2008-04-11 10:16
Joined: 2007-09-27
Forum posts: 6

Hello All,
I am getting panic in LB creation....I am switching from base view to second (A listbox view) and from second to third view
whr m getting panic,,,,I am using an array which will provide the text for ListBox...but when i am coming out of the for loop ...
the array is missing from the debug parameter.....and at model.ModelEndUpdateL(); i am getting user 130....

Plz help me ...
Code is posted bolw....

CQikListBox* SongPlayListlistBox;

void CPlayListBoxListView::ViewConstructL()
{
ViewConstructFromResourceL(R_LISTBOX_PLAYLISTVIEW_UI_CONFIGURATIONS);
CreatePlayListItemsL();
}

/void CPlayListBoxListView::CreatePlayListItemsL()
{
RArray GetPlayListArrContent=iUtility->HandleListBoxEventInUtility(Default);
PlayListlistBox = LocateControlByUniqueHandle(EListBoxListViewListCtrl);
PlayListlistBox->SetListBoxObserver(this);
MQikListBoxModel& model(PlayListlistBox->Model());
model.ModelBeginUpdateLC();

for(ItemPos = 0; ItemPos {
MQikListBoxData* listBoxData = model.NewDataL(MQikListBoxModel::EDataNormal);
CleanupClosePushL(*listBoxData);

TBuf16 itemName16(KNullDesC);
itemName16=GetPlayListArrContent[ItemPos].InfoName;
listBoxData->AddTextL(itemName16, EQikListBoxSlotText1);
CleanupStack::PopAndDestroy(listBoxData);
}
GetPlayListArrContent.Close();
model.ModelEndUpdateL();
}

FYI: i am not able to find the mistake which i have done.....as when i am testing it without RArray (taking only single buffer in LB) it still giving panic..................at the same position...........


Sat, 2008-04-12 17:15
Joined: 2003-12-05
Forum posts: 586
Re: Getting User-130 in ListBox Construction in the third level

A bit frustrating to comment on a code which shouldn't even compile:

RArray GetPlayListArrContent=iUtility->HandleListBoxEventInUtility(Default);

And:

for(ItemPos = 0; ItemPos {
...

But: you are in the loop creating listboxdata elements and then destroying them in each round. Is this really what you want to do?

Sun, 2008-04-13 06:27
Joined: 2005-11-20
Forum posts: 1058
That's how UIQ3 listbox models work

But: you are in the loop creating listboxdata elements and then destroying them in each round. Is this really what you want to do?

Yes, strange as it may seem, that's really what prajna wants to do, because that's how UIQ3 listbox models work. Search for "MQikListBoxData" e.g. on this page:
http://books.uiq.com/index.php/List_boxes

It's not the only place of somewhat strange and confusing ownership semantics in UIQ3's classes. As if avoiding memory leaks and memory management in C++ in general were not yet hard enough...

I checked the code and saw nothing obviously wrong.


René Brunner

Mon, 2008-04-14 05:01
Joined: 2007-09-27
Forum posts: 6
Re: Getting User-130 in ListBox

Guys no syntax error or something like this......

m correcting myself which i did wrong at the time of copy paste
for(ItemPos = 0; ItemPos ;ItemPos ++)
{
}

and RArray GetPlayListArrContent=iUtility->HandleListBoxEventInUtility(buf); is something that provide the content for my listbox....and its nt even compiling but running too in all views....but in this view only m getting panic....

Mon, 2008-04-14 12:39
Joined: 2008-04-11
Forum posts: 18
Re: Getting User-130 in ListBox Construction in the

I think it may be the problem because ......here implementation of next view is done thrw the view which already contains the listbox and in the next view also u are creating the listbox and which may cause the problem


correct me if m worng

  • Login to reply to this topic.