×
Namespaces

Variants
Actions

Symbian C++ application start-Up sequence

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: eswar_illuri (04 May 2007)
Last edited: hamishwillee (25 Jan 2012)

This is the entry point function for the application: E32Main() calls the application framework to run the application. Further explanation of each step in the sequence is included below:

  1. NewApplication() factory function is called by the application framework to create the application object. It is a global function, not a member of CMyAppApp and cannot leave.
  2. CMyAppApp::CreateDocumentL() directly calls CMyAppDocument::NewL().
  3. First and second phase construction is done here.
  4. CMyAppDocument::CreateAppUiL() directly calls the default C++ constructor of CMyAppAppUi.
  5. The default constructor just allocates memory for the object and initialises all members to 0.
  6. CMyAppAppUi::ConstructL() creates the container. BaseConstructL() is always called in this method.
  7. The container object is created here (this is not a view-based application).
  8. CMyAppContainer::SetMopParent() sets the parent of the container to be the App UI. This is necessary if the container needs to use the scroll bar(scroll bars will be covered in the “UI Features” module).
  9. CMyAppContainer::ConstructL() is called to perform second-phase construction

of the container. Note that a TRect& is passed through to the container at this stage. The container is not drawn until CCoeControl::ActivateL() is called and control is returned to the active scheduler (the application’s event loop). Therefore if any size calculations need to be done at construction time, the area of the container needs to be passed in by the App Ui.


StartupSequence.gif


When the application process starts, E32Main() is called.


External References

This page was last modified on 25 January 2012, at 04:17.
71 page views in the last 30 days.