×

Discussion Board

Results 1 to 4 of 4

Hybrid View

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    13

    How to remove a view?

    Hi all,
    I use the CAknViewAppUi's member functions AddViewL(CAknView* aView) and RemoveView(TUid aViewId) to add and remove a view, the addviewL works well but when I call the RemoveView(theViewID), the program crash, I find a line "Panic user 42" in the vc's debug info.
    How can I do?

  2. #2
    Regular Contributor
    Join Date
    Oct 2003
    Location
    England
    Posts
    167

    Adding/removing views

    The sequence of command i have used in the past which works fine is .....


    RegisterViewL ( .... );
    AddToStackL( ...., .... );

    SetDefaultViewL( .... );

    then

    RemoveFromStack ( .... );
    DeregisterView ( .... );
    delete <the view name here>;

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    61

    Re: How to remove a view?

    Any update on this very old topic? Does the view management on CAknViewAppUi work, considering RemoveView, or should I manage the views myself manually bypassing the CAknViewAppUi view management? At least my experiences with 2.0 SDK looks like that. The documentation on CAknViewAppUi in v2.0 compared to 2nd edition FP2 are identical (no documentation whatsoever on RemoveView).

    CAknViewAppUi crashes if I try to remove my view using RemoveView (no panic, everything just shuts down).

  4. #4
    Regular Contributor
    Join Date
    May 2005
    Location
    Tokyo
    Posts
    365

    Re: How to remove a view?

    Hello, i think NavaronSoftware is right...but pay attetion to the params plz.
    RegisterViewL ( .... ); // view`s instance
    AddToStackL( ...., .... ); // view`s pointer
    SetDefaultViewL( .... );// view`s instance

    then

    RemoveFromStack ( .... );// view`s pointer
    DeregisterView ( .... );// view`s instance
    delete <the view name here>;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×