×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    1

    Ask for help:Avkon view switch

    Hi
    I have tried using the Avkon switch view architecture for the first time and it did switch very well to the second view but when trying to switch back to the first view it gave me system error -1, though there is almost no diffrence between the key event handling in both cases.

    the code switching to the second view in the "void CFirstContainerView::HandleCommandL( TInt aCommand )" function in the first view is :
    switch ( aCommand )
    { // code to dispatch to the AknView's menu and CBA commands is generated here

    case EFirstContainerViewSwitch_second_viewMenuItemCommand:
    AppUi()->ActivateLocalViewL(KDemo2ViewId);
    commandHandled = ETrue;
    break;
    default:
    break;
    }
    while the code switching back to the first view in the "void CFirstContainerView::HandleCommandL( TInt aCommand )" function in the second view is :
    switch ( aCommand )
    {
    const TUid KDemo1ViewId = { EFirstContainerViewId };
    // code to dispatch to the AknView's menu and CBA commands is generated here
    case ESecondContainerViewSwitch_first_viewMenuItemCommand:
    AppUi()->ActivateLocalViewL(KDemo1ViewId);
    commandHandled = ETrue;
    break;
    default:
    break;
    }

    I hope someone could find the problem an be able to help me.
    thanks in advance.

  2. #2
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Ask for help:Avkon view switch

    Hi,
    have you already tried to see WHERE it dies?

    Set breakpoints in the view constructors...

    Tam
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  3. #3
    Registered User
    Join Date
    Mar 2009
    Location
    Indonesia
    Posts
    45

    Re: Ask for help:Avkon view switch

    Hi doaaiti30.

    I am new to Symbian S60 development. When i encounter a crash event, I just add a globalNote code between suspicious code.
    Code:
    CAknGlobalNote* globalNote = CAknGlobalNote::NewLC();
    globalNote->ShowNoteL(EAknGlobaInformationNote,_L("Here 1"));
                // suspicious code
    globalNote->ShowNoteL(EAknGlobaInformationNote,_L("Here 2"));
    CleanupStack::PopAndDestroy(globalNote);
    So, if "Here 1" popped and "Here 2" doesn't popped, you'va located the problem.

    Hope it helps.

    Sincerely,
    Harapan.
    He may not give what you want, but He will give what you need.

  4. #4
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Ask for help:Avkon view switch

    Just use the debugger!! Seriously - for native S60 apps, its lovely.
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

Similar Threads

  1. can a view in an app switch to another view in same app?
    By juannoguera in forum Symbian User Interface
    Replies: 4
    Last Post: 2009-07-20, 08:56
  2. Replies: 4
    Last Post: 2009-01-12, 12:35
  3. question about switch different control within one view
    By liuxingyu_best in forum Symbian User Interface
    Replies: 0
    Last Post: 2008-06-17, 15:33
  4. Switch containers (In Not Multi View Architecture)
    By Kavit Patel in forum Symbian
    Replies: 2
    Last Post: 2008-04-05, 09:37
  5. Trigger event after view is Activated?
    By inc0gn1t007 in forum Symbian
    Replies: 0
    Last Post: 2006-03-29, 02:55

Posting Permissions

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