Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User GuardianLurker's Avatar
    Join Date
    May 2007
    Posts
    18
    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 GuardianLurker's Avatar
    Join Date
    May 2007
    Posts
    18
    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 wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,746
    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 GuardianLurker's Avatar
    Join Date
    May 2007
    Posts
    18
    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 C++
    Replies: 4
    Last Post: 2007-03-15, 14:38
  3. View changing
    By ckt in forum Symbian C++
    Replies: 7
    Last Post: 2007-02-22, 13:02
  4. Trigger event after view is Activated?
    By inc0gn1t007 in forum Symbian C++
    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
  •  
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