Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2004

    Best way to store data that multiple containers need?

    I have an application that has multiple containers for different UI screens that are displayed. Some of the containers display the same images. My question is, what would be the best way and place to store images that are stored on the heap so that multiple containers may ahve access to them?

    My first thought was just to store them in the AppUI class and then have all the containers pull the data from there. Should I just create an object and pass a reference to each container that needs it?

    I am using the traditional based architecture.

    Last edited by Subotai4Winds; 2005-01-31 at 18:25.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    AppUi is propably the best place, simply because you can get pointer to it from anywhere in your application by just using the CEikonenv class.

    Basically I would make a function in the AppUi that returns the pointer to the image when called, and the caller would then check if the pointer is valid before trying to draw it to the screen.


  3. #3
    Super Contributor
    Join Date
    Apr 2003
    Czech Republic
    That is always a good question...:-)
    I don't agree with Yucca (how rude of me..:-) or at least not entirely.

    Anyway, in these cases I always ask this question: "is it related to the logic of application, or at least general stuff that can be reused across all symbian platforms? Or is it Series60 specific stuff that will be changed when porting to different platform?

    In the first example it should go to Document / Model class, in the second it should go to AppUi....

    This way you are more consistent with M-V-C paradigm...


  4. #4
    Registered User
    Join Date
    Sep 2004
    Cool thanks for the info!

Posting Permissions

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