Archived:Accessing data anywhere in application
Developer most of the time seek for a method or a way to place the data somewhere in such a way that it can be accessed globally from anywhere.
There are primarily two ways in which this can be achieved. The first is the most appropriate way suggested by symbian framework but second also turn to be usefull.
1. Using Document class
The document class is the most appropriate place to keep the data which needs to be accessed from the whole application according to document and view architecture. the document class is accessible in several ways on of the way is to use
CEikonEnv class's global object.
2. Using AppUi class
The application UI class aka AppUi can also serve as a placeholder to hold the global data( rather i would say the data that needs to be accessed from anywhere). The data can be placed in AppUi class and then can be accessed from anywhere using the AppUi reference which can be retrieved using the global iEikEnv object
Though the above mentioned approach is not very much prefered but also a way out.
Also one more use of AppUi that can be done is, the globally required methods can be placed in AppUi class and can be accessed using AppUi reference , which again can be retrieved using iEikEnv global object(reference).