Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User xianwentong's Avatar
    Join Date
    Sep 2003
    Posts
    13
    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 NavaronSoftware's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    167
    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 anttij's Avatar
    Join Date
    Mar 2003
    Posts
    61
    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 SymbianLN's Avatar
    Join Date
    May 2005
    Location
    Tokyo
    Posts
    365
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved