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.
Thanks
Last edited by Subotai4Winds; 2005-01-31 at 18:25.
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.
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...