×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    18

    Replacing a view in a multiview UI?

    Hi all.

    I've got a problem. I have a multiview application. A set number of these views are always available. One of the views is a list of items. I would like to replace the list view with a view displaying the item selected, and then return to the list view when done. And I also want to keep the view "state" persistent, so if the user switches to a different view (tab), and returns, it is still in the same state.

    Any ideas on how to go about this?

  2. #2
    Registered User
    Join Date
    May 2007
    Posts
    18

    Re: Replacing a view in a multiview UI?

    Let me clarify: are there any existing API calls which allow for this, or am I going to have to roll my own "save-state-and-swap" code? Or, put another way, is there any existing APIs to provide single, in-thread, data model(s) to the existing Views and Containers built by the UI Designer?

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: Replacing a view in a multiview UI?

    Although I do not really understand the internals of a view, you can try what happens if you do not delete the control in DoDeactivate (and if the control already exist, do not create a new one in DoActivate).

  4. #4
    Registered User
    Join Date
    May 2007
    Posts
    18

    Re: Replacing a view in a multiview UI?

    Actually, I realized I can catch the tab switching (or more accurately insert into the tab switching) to handle the special case, and use the Document class (shocking!) to handle the model stuff. It's actually even fairly straightforward.

    It'd still be nice to have a ReplaceView or somesuch, but I'll live. Because this direct solution is going to generate a lot of Activate/Deactivate calls and those can be problematic. Oh, and for the record, removing a view corresponding to a tab in the resource file is a Bad Idea.

    As for the Deactivate hustle, I'm pretty sure what would happen, (PANIC) since the generated code expects the Containers to be owned by the View, and is "chatty" in both directions, and to do what you're talking about, I'd have to break that link. Even worse, I need to swap out the container classes with their corresponding views, so that doesn't really help.

Similar Threads

  1. Go back to caller view...
    By VinodRaut in forum Symbian User Interface
    Replies: 4
    Last Post: 2007-05-11, 14:22
  2. Traditional Symbian view architecture
    By joelshaf in forum Symbian
    Replies: 4
    Last Post: 2007-03-15, 14:38
  3. View changing
    By ckt in forum Symbian
    Replies: 7
    Last Post: 2007-02-22, 13:02
  4. Trigger event after view is Activated?
    By inc0gn1t007 in forum Symbian
    Replies: 0
    Last Post: 2006-03-29, 02:55
  5. Replies: 1
    Last Post: 2005-10-17, 04:23

Posting Permissions

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