Eleave Help !
Login to reply to this topic.
Mon, 2005-01-31 14:06
Joined: 2004-07-15
Forum posts: 71
When i use Eleave in my code  i got the following error

Quote
error C2065: 'Eleave' : undeclared identifier

is there any rewuired headers or what ?

thanks in advance ...

Mon, 2005-01-31 14:21
Joined: 2004-09-25
Forum posts: 75
Quote from: Kerdany
When i use Eleave in my code  i got the following error

Quote
error C2065: 'Eleave' : undeclared identifier

is there any rewuired headers or what ?

thanks in advance ...

Try ELeave instead
Mon, 2005-01-31 14:34
Joined: 2004-07-28
Forum posts: 1379
Only e32base.h

How are you using it?

Like this?

CBlah* p = new (ELeave) CBlah;

didster

Mon, 2005-01-31 14:46
Joined: 2004-07-15
Forum posts: 71
yes i use it like this

Code:
iListBox = new (Eleave)CAknSingleNumberStyleListBox;
Mon, 2005-01-31 14:49
Joined: 2004-07-28
Forum posts: 1379
And you include <e32base.h>?

Is it in it's own namespace or the global one?

Does it fail everywhere or just on that line?

didster

Mon, 2005-01-31 15:12
Joined: 2004-07-15
Forum posts: 71
- yes i 've included <e32base.h>
-in it's own namespace
-fail everywhere
Mon, 2005-01-31 15:54
Joined: 2005-01-31
Forum posts: 1
in your posting you say

...new (Eleave)...

try

...new (ELeave) ...
Mon, 2005-01-31 15:55
Joined: 2004-07-28
Forum posts: 1379
Odd...

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

Mon, 2005-01-31 22:22
Joined: 2004-07-15
Forum posts: 71
I 've mistaken it work in other function like NewL,NewLC created by the Wizard but when i add it didn't work

No Errors here
Code:

CMyListBoxContainer2* CMyListBoxContainer2::NewLC(const TRect& aRect)
   {
   CMyListBoxContainer2* self = new (ELeave) CMyListBoxContainer2;
   CleanupStack::PushL(self);
   self->ConstructL(aRect);
   return self;
   }


But Didn't work here

Code:

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 ...
Mon, 2005-01-31 22:51
Joined: 2004-07-28
Forum posts: 1379
You sure it knows what a "CAknSingleNumberStyleListBox" is?  i.e. you have included the correct header?

didster

Mon, 2005-01-31 23:43
Anonymous (not verified)
Forum posts: 2037
yes because when i remove the Eleave it works propably
Tue, 2005-02-01 07:57
Joined: 2005-01-19
Forum posts: 46
hi there,
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
Tue, 2005-02-01 08:54
Joined: 2004-07-28
Forum posts: 1379
Good point Smiley  And well spotted.

didster

Tue, 2005-02-01 17:48
Joined: 2004-07-15
Forum posts: 71
thanks Rahul it worked Wink
Tue, 2005-02-01 18:08
Anonymous (not verified)
Forum posts: 2037
What the HuhHuh?
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 Huh
My god.
Tue, 2005-02-01 18:40
Joined: 2004-07-15
Forum posts: 71
It wasn't clear or i didn't remark the difference

but Rahul was clear and well spotted as didster said

copyright 2003-2009 NewLC SARL