|
|
User login
Feeds |
Problem with Multiviews and SetModParent ... Help !!!
|
|||||
| Fri, 2003-10-31 17:27 | |
|
Hi all !
I have created an application with 2 views. I am using a ListBox in one of this view. I used "OfferKeyEventL" in the container of this view but I can´t scroll the ListBox ... I think the problem might come from SetModParent. I´ve tried : Code: // ---- View1.cpp ---- If I give a reference of my AppUi to my View, I got an error:// iContainer = Only container from view 1 // iContainer contains my ListBox, which I want to scroll ... iContainer->SetMopParent(iAppUi()); // doesn´t work 'SetMopParent' : cannot convert parameter 1 from 'class CAppUi *' to 'class MObjectProvider *' Thanx for your help !!!!! |
|
Forum posts: 5
I am not sure if you are using the view architecture in your application.
Anyway, when you construct the control, you can do something like this:
1. construct your control, which contains the list box with the default constructor
2. use SetMopParent(this) // "this" can refer to the instance of the view or the appui.
3. complete the second phase construction.
In the view architecture, these steps are done in the DoActivateL() function.
Otherwise, use it in the appui second phase construction.
Forum posts: 50
I do use multiviews ...
Thus I created my listbox and used SetMopParent(this) in my DoActivateL function ...
But it doesn´t work
How could I test, whether the problem comes from the listbox or from any control in my app ?
Thanx again ...
Forum posts: 50
I´ve realised that I totally forgot to use this in my DoActivate :
AppUi()->AddToViewStackL(*this, iContainer);
And one still has to remove it from Stack in the DoDeactivate() ...
Cheers,
Valentin