Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User Vymmiatacz's Avatar
    Join Date
    Nov 2007
    Posts
    35
    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 ltomuta's Avatar
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,335
    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)

  3. #3
    Registered User Vymmiatacz's Avatar
    Join Date
    Nov 2007
    Posts
    35
    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 wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    How about some casting?

  5. #5
    Nokia Developer Moderator ltomuta's Avatar
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,335
    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.

  6. #6
    Registered User Vymmiatacz's Avatar
    Join Date
    Nov 2007
    Posts
    35
    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 C++
    Replies: 1
    Last Post: 2004-08-03, 16:14
  4. how to share data between two views?
    By dreamplayer in forum Symbian C++
    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
  •  
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