When changing views, application crashes. Why?

Login to reply to this topic.
Wed, 2006-03-15 05:21
Joined: 2006-03-10
Forum posts: 36
Hi,

I am creating 3 views and showing one as default. When a menu is clicked, i need to show another view which i tried with the command ActivateLocalViewL(TUid::Uid(EListboxViewId)). And the application crashes here. What mistake am i making? Pls help.

And the code goes here:
------------------------

    iView1 = CView1::NewL();     
    iView2 = CView2::NewL();   
    iView3 = CView3::NewL(iEngine, iView2); 
       
   AddViewL(iView1); // Transfer ownership to base class         
    AddViewL(iView2); // Transfer ownership to base class
    AddViewL(iView3); // Transfer ownership to base class       
   
    SetDefaultViewL(*iView1);


When a menu is clicked, i am calling the following function:
------------------------------------------------------------

void CTestAppUi::ChangeView()
   {      
   ActivateLocalViewL(TUid::Uid(EView2ID));
   }
   
Thanks,
sethuraman

Thu, 2006-03-23 06:59
Joined: 2006-03-23
Forum posts: 7
Re: When changing views, application crashes. Why?
Register Your Views
Thu, 2006-03-23 12:36
Joined: 2006-03-10
Forum posts: 36
Re: When changing views, application crashes. Why?
Quote from: chityala_shailesh
Register Your Views

Thanks, shailesh.
  • Login to reply to this topic.