×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    35

    data passing between many views

    In my application I'm trying to utilize MVC architecture. I have two views (Main and Settings), every single view has own Container.

    I would like to pass pointer from 'Main' to the newly activated 'Settings' view - but how ?
    According to the following method signature, the only thing I can pass is a descriptor.

    Code:
    ActivateLocalViewL(const TVwsViewId& aViewId,
    TUid aCustomMessageId,const TDesC8& aCustomMessage)
    This is not enough for me. What should I do?

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: data passing between many views

    If the Settings view needs a pointer to the model it can get it from the controller (*AppUI), either at construction time (parameter) or at activation time (query the controller)
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    35

    Re: data passing between many views

    Quote Originally Posted by ltomuta View Post
    If the Settings view needs a pointer to the model it can get it from the controller (*AppUI), either at construction time (parameter) or at activation time (query the controller)
    Ok, let's assume that I will move all the crucial objects with theirs datas into MyApplicationAppUI class. But how can I access them from views? I tried to use AppUi() method, but this method returns pointer to generic interface CAknViewAppUi, which is another view, not the controller...
    I cannot see my objects thru pointer to CAknViewAppUi.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: data passing between many views

    How about some casting?

  5. #5
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: data passing between many views

    And since you want to implement MVC pattern you should separate the M from C and then passing the M to V at construction time would make more sense and would be a piece of pie to implement.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  6. #6
    Registered User
    Join Date
    Nov 2007
    Posts
    35

    Re: data passing between many views

    Quote Originally Posted by wizard_hu_ View Post
    How about some casting?
    Probably you got right.
    It seems to me not very elegant solution, but for sure, working and "cheapest" one.

Similar Threads

  1. Passing data from form to container
    By ninidotnet in forum Symbian User Interface
    Replies: 5
    Last Post: 2006-12-22, 07:00
  2. temporary store data for views
    By ArneH in forum Symbian User Interface
    Replies: 2
    Last Post: 2004-09-17, 12:56
  3. Problems with client/server data transfer
    By wilse in forum Symbian
    Replies: 1
    Last Post: 2004-08-03, 16:14
  4. how to share data between two views?
    By dreamplayer in forum Symbian
    Replies: 2
    Last Post: 2004-05-07, 11:20
  5. passing data to another application.
    By prbhat in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-11-27, 13:15

Posting Permissions

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