void CMyListBoxContainer2::ConstructL(const TRect& aRect) { CreateWindowL(); SetRect(aRect); //Create the listbox here CAknSingleNumberStyleListBox //Listbox format "%d\t%S\t\t"
iListBox = new (Eleave) CAknSingleNumberStyleListBox; iListBox->ConstructL(this); iListBox->SetContainerWindowL(*this);
CDesCArray* kArray = new CDesCArrayFlat(3); CleanupStack::PushL(kArray); kArray->AppendL(_L("1\taaa\t\t") ); kArray->AppendL(_L("2\tbbb\t\t")); CleanupStack::Pop();
What the ? Slava Monich made that suggestion with the very first reply to this post, a few posting later estecoth made the same suggestion. So its not until a third person suggests it that you actually try My god.
Forum posts: 75
is there any rewuired headers or what ?
thanks in advance ...
Try ELeave instead
Forum posts: 1379
How are you using it?
Like this?
CBlah* p = new (ELeave) CBlah;
didster
Forum posts: 71
Forum posts: 1379
Is it in it's own namespace or the global one?
Does it fail everywhere or just on that line?
didster
Forum posts: 71
-in it's own namespace
-fail everywhere
Forum posts: 1
...new (Eleave)...
try
...new (ELeave) ...
Forum posts: 1379
It shouldnt really matter about the same space, since it should also chek the global one.
You haven't decalred anything called "TLeave" in your namespace have you?
didster
Forum posts: 71
No Errors here
CMyListBoxContainer2* CMyListBoxContainer2::NewLC(const TRect& aRect)
{
CMyListBoxContainer2* self = new (ELeave) CMyListBoxContainer2;
CleanupStack::PushL(self);
self->ConstructL(aRect);
return self;
}
But Didn't work here
void CMyListBoxContainer2::ConstructL(const TRect& aRect)
{
CreateWindowL();
SetRect(aRect);
//Create the listbox here CAknSingleNumberStyleListBox
//Listbox format "%d\t%S\t\t"
iListBox = new (Eleave) CAknSingleNumberStyleListBox;
iListBox->ConstructL(this);
iListBox->SetContainerWindowL(*this);
CDesCArray* kArray = new CDesCArrayFlat(3);
CleanupStack::PushL(kArray);
kArray->AppendL(_L("1\taaa\t\t") );
kArray->AppendL(_L("2\tbbb\t\t"));
CleanupStack::Pop();
iListBox->Model()->SetItemTextArray(kArray);
iListBox->ActivateL();
iListBox->HandleItemAdditionL();
/// iListBox->SetRect(Rect());
ActivateL();
}
thanks in Advance ...
Forum posts: 1379
didster
Forum posts: 46
i just think that u r missing the case of letter "L"
u r using it like this :
iListBox = new (Eleave)CAknSingleNumberStyleListBox;
but u should be using it like this :
iListBox = new (ELeave)CAknSingleNumberStyleListBox;
see the ELeave
i think the problem is u r using small case "l" in ELeave,
it should be capital
i hope it will solve ur problem
all the best
RaHuL
Forum posts: 1379
didster
Forum posts: 71
Slava Monich made that suggestion with the very first reply to this post, a few posting later estecoth made the same suggestion.
So its not until a third person suggests it that you actually try
My god.
Forum posts: 71
but Rahul was clear and well spotted as didster said