diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-FC63E2D1-697C-4890-9B70-0DC0AAE7597C.dita --- a/Symbian3/PDK/Source/GUID-FC63E2D1-697C-4890-9B70-0DC0AAE7597C.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-FC63E2D1-697C-4890-9B70-0DC0AAE7597C.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,35 +1,35 @@ - - - - - -Switching -views in traditional architecture -

If the application contains multiple views and they need to be switched, -it can be done in various ways. One of the common ways is to delete the current -view, create a new view, and add the new one to the control stack. Here, CMyAppUi has -a custom method to change a view. Often a more generic approach should be -favored, but for simplicity the basic idea could be as follows:

-void CMyAppUi::ChangeToView2L() - { - CCoeControl* newView = CMyAppView2::NewL(ClientRect()); - if(iCurrentView) - { - RemoveFromStack(iCurrentView); - delete iCurrentView; - } - iCurrentView = newView; - AddToStackL(iCurrentView); - } - -

Although this architecture provides the most flexible way of manipulating -different views, the view -architecture should be considered. Among other things, it provides -a ready framework for doing the essentials in view switching.

+ + + + + +Switching +views in traditional architecture +

If the application contains multiple views and they need to be switched, +it can be done in various ways. One of the common ways is to delete the current +view, create a new view, and add the new one to the control stack. Here, CMyAppUi has +a custom method to change a view. Often a more generic approach should be +favored, but for simplicity the basic idea could be as follows:

+void CMyAppUi::ChangeToView2L() + { + CCoeControl* newView = CMyAppView2::NewL(ClientRect()); + if(iCurrentView) + { + RemoveFromStack(iCurrentView); + delete iCurrentView; + } + iCurrentView = newView; + AddToStackL(iCurrentView); + } + +

Although this architecture provides the most flexible way of manipulating +different views, the view +architecture should be considered. Among other things, it provides +a ready framework for doing the essentials in view switching.

\ No newline at end of file