Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2005

    Does the default view set by SetDefaultViewL must be the first view to dispaly?

    Does the default view set by SetDefaultViewL must be the first view to dispaly?

    I found it's interesting,

    when i did not set any default view by SetDefaultViewL, the first view be added to the stack will be shown at app startup even i use ActivateViewL to activate some other view at the end of the AppUi ConstructL() fuction or not.

    Actually ,I set some default view because i wat show this view when the application switch back,but not show this view at start up, but i can not manage to achive this.

    Anyone‘s advice will be appreciated, Thx u very much!

    code could be as follows:
    void CSjAppUi::ConstructL()
    splash = new (ELeave) CFbsBitmap;
    iSomeView=new (ELeave) CSomeContainer(splash);
    RegisterViewL(*iSomeView );
    AddToStackL(*iSomeView , iSomeView );

    iTextView=new (ELeave) CTextContainer(splash);
    AddToStackL(*iTextView, iTextView);

    splash = new (ELeave) CFbsBitmap;
    iStartView=new (ELeave) CStartContainer(splash);
    AddToStackL(*iStartView, iStartView);


    void CSjAppUi::SwitchViewL(const TUid& aTargetViewId/*, CContainer& aTargetView*/)
    //if (CurrentView() != &aTargetView)

    TVwsViewId id(KUidsj, aTargetViewId);

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003

    Re: Does the default view set by SetDefaultViewL must be the first view to dispaly?

    the SetDefaultViewL is used to show the defualt view that is shown in the application start up. So which ever view you want to start with, you should define it to be the default one.

    Then use view switcvhing later in your application code to switch between views, by activating teh view you wish to switch to. And when you want to switvh back to the default view, just call to activate it again.


Similar Threads

  1. Replies: 1
    Last Post: 2005-06-16, 12:15
  2. Replies: 9
    Last Post: 2005-04-28, 14:28
  3. HOw to Set the Default Device
    By amitaggarwal in forum Symbian
    Replies: 1
    Last Post: 2004-12-01, 12:00
  4. Replies: 1
    Last Post: 2003-08-14, 11:35
  5. 7650 SetDefaultViewL() doesn't set right navigation tab
    By 4sure in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-09-25, 09:16

Posting Permissions

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