help me....

Login to reply to this topic.
Fri, 2008-08-29 12:08
Joined: 2008-08-28
Forum posts: 27

Could any1 tell me why this function leave:
void CMyListAppView::SetupListIconsL()
{
// Get the name of the file containing the icons
HBufC* iconFileName;
iconFileName = StringLoader::LoadLC(R_MYLIST); // Pushes iconFileName onto the Cleanup Stack.

// Create an array of icons, reading them from the file
CArrayPtr* icons = new(ELeave) CAknIconArray(KNumberOfIcons);
CleanupStack::PushL(icons);

icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmMylistPen_icon, EMbmMylistPen_icon_mask));//Leave on this line[/i]
icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmMylistPen_icon, EMbmMylistPen_icon_mask));
CleanupStack::Pop(icons);
CleanupStack::PopAndDestroy(iconFileName);
iSavedGamesListBox->ItemDrawer()->ColumnData()->SetIconArray(icons); // passing ownership of icons
}
thxx


Fri, 2008-08-29 12:09
Joined: 2008-08-28
Forum posts: 27
Re: help me....

I am very new in symbian ......Plzz help me.....

Fri, 2008-08-29 12:35
Joined: 2003-12-05
Forum posts: 672
Re: help me....

What is the leave code?

Fri, 2008-08-29 12:44
Joined: 2008-08-28
Forum posts: 27
Re: help me....

I am very new in Symbian ,hw can i find out the leave code?

Fri, 2008-08-29 12:45
Joined: 2008-08-28
Forum posts: 27
Re: help me....

perhaps u r asking about the instruction comes in debug code,that is Multiple markers in this line........
Puzzled

Fri, 2008-08-29 13:41
Joined: 2003-12-05
Forum posts: 672
Re: help me....

Well if nothing else, you can call this method inside TRAPD and check out the leave code in debugger.

Fri, 2008-08-29 16:52
Joined: 2007-09-23
Forum posts: 159
Re: help me....

Take out the nested call and put the trap first on the first line i.e.

icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmMylistPen_icon, EMbmMylistPen_icon_mask));//

TRAPD(ret, iEikonEnv->CreateIconL(*iconFileName, EMbmMylistPen_icon, EMbmMylistPen_icon_mask));

if ret isn't KErrNone (0) the problem is with that line, if it is KErrNone do a similar thing with the full line.

TRAPD(ret2, icons->AppendL(iEikonEnv->CreateIconL(*iconFileName, EMbmMylistPen_icon, EMbmMylistPen_icon_mask)));

If the first TRAP leaves take a look at iconFileName, make sure its not null, if its not then does it contain sensible looking data?

etc.

Mon, 2008-09-01 08:54
Joined: 2008-08-28
Forum posts: 27
Re: help me....

Thxx for the reply ,but i still have the problem........
i did TRAPD(ret, iEikonEnv->CreateIconL(*iconFileName, EMbmMylistPen_icon, EMbmMylistPen_icon_mask));
nd get the value x=-858993460.......I don't know what to do??
Plzz help me......

Mon, 2008-09-01 11:14
Joined: 2008-08-28
Forum posts: 27
Re: help me....

Hi i took the reference from markable list present in symbian.....but it doesn't work in my project.....can any1 help me...........can i show the whole code.........

Mon, 2008-09-01 11:31
Joined: 2007-08-29
Forum posts: 293
Re: help me....

you can get non-markable/markable list from this link.

http://wiki.forum.nokia.com/index.php/Custom_list


Thanks & Regards
Ram

Symbian OS 9.1,S60 3rd edition MR,and Carbide.C++

  • Login to reply to this topic.