×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    26

    How to switch the Avkon view synchronously?

    Hi!

    Is there any way to wait, after calling ActivateLocalViewL(), until the view is actually switched and drawn? Or get some notification callback when it actually happens?

    I have described my very problem here
    http://discussion.forum.nokia.com/fo...d.php?t=150489
    however it appears to be even more problematic - any time I try to switch the view and display the note in "one shot". I'm now almost sure this is due to asynchronous nature of view switching.

    It is quite easy to reproduce the problem with sample application available here:
    http://discussion.forum.nokia.com/fo...d.php?t=150489

    I modified it by adding
    Code:
       CAknErrorNote* iNote = new (ELeave) CAknErrorNote(ETrue);
       iNote->SetTimeout(CAknNoteDialog::ENoTimeout);
       iNote->ExecuteLD(_L("test"));
    into UIDesignAppUi.cpp HandleKeyEventL() right after
    Code:
    ActivateLocalViewL( TUid::Uid( iNaviTabs1->TabIdFromIndex( active ) ) );
    in line 181.

    Result: any time you navigate left, the current view is dimmed for a short while, but then it switches to the next tab as usual. Note window is not displayed.

    Is my understanding correct, that CAknErrorNote is just a window-owning control, and has nothing to do with avkon view switching? According to documentation, each new window is automatically placed on top of window stack, so obviously the note will get obscured, if any delayed view activation happens.

    Any help appreciated! For the moment the only option I see is to display modal note before trying to switch the view, but this contradicts my UI design a bit...

  2. #2
    Registered User
    Join Date
    Sep 2008
    Posts
    26

    Re: How to switch the Avkon view synchronously?

    Ooops, link was wrong.

    The correct link to the app is
    http://wiki.forum.nokia.com/index.ph...with_UI_Design

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: How to switch the Avkon view synchronously?

    you could make your view to callback when it is activated.. As far as I know it would be only real solution.

    Or just forget the views, and instead use CCoeControl based containers directly.

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: How to switch the Avkon view synchronously?

    Did you put a breakpoint in your callback to verify the callback is actually being called, as I suspect this is the not the case.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  5. #5
    Registered User
    Join Date
    Sep 2008
    Posts
    26

    Re: How to switch the Avkon view synchronously?

    Quote Originally Posted by symbianyucca View Post
    you could make your view to callback when it is activated.. As far as I know it would be only real solution.

    Or just forget the views, and instead use CCoeControl based containers directly.
    The first thing you propose was problematic, I tried it first. I tried putting CAknErrorNote into DoActivateL(), but in this case the view was not repainted before the error note appearing. Perhaps I could force it via DrawNowL(), but I decided to try something else.

    And the problem is solved now - I basically use a combination of what you proposed, with CAsyncCallBack, and it appears to work pretty well. I just 'kick' CAsyncCallBack in view's DoActivateL.

    BR,
    Przemek

Similar Threads

  1. How can I set another view's value when I switch to this view?
    By GFYsweetwood in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-11-21, 14:03
  2. CAknErrorNote +Avkon view = window stacking problem
    By pwegrzyn in forum Symbian User Interface
    Replies: 6
    Last Post: 2008-11-19, 14:35
  3. error PRJ0019 error while creating sis file
    By mrshine in forum Symbian
    Replies: 3
    Last Post: 2008-10-17, 17:16
  4. Avkon - view switching and passing data
    By series60nubee in forum Symbian
    Replies: 6
    Last Post: 2007-08-23, 07:15
  5. Problems between view switch
    By JohnsonZ in forum Symbian
    Replies: 1
    Last Post: 2007-07-12, 16:50

Posting Permissions

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