View And Controls
| Sun, 2006-05-07 15:13 | |
|
Hi Gang:
I have been struggling with this problem for last couple of days. The problem is that I want an application which supports multiple views and one of these views has a listbox. A control having a listbox will inherit from CCoeControl and override interesting operations whereas a control which is a view will inherit from CAknView, which contains methods for switching views etc. The most obvious way out, aka making this view inherit from both CCoeControl and CAknView does not works. So I was struck with this problem for about a week. I just finished checking out the multiviews example and there I found a solution to this problem. The idea is to follow the view and container model. The view will inherit from CAknView while the container will inherit from CCoeControl. Just wanted to ask why exactlt do we need this view-controller model? Why can't we have a simplistic class which derives from both and overrides operations of interest. TIA Manu Anand Hyd'bad, India |
|






Forum posts: 1246
I don't know much about S60, but I am just now working on a UIQ application with multiple views, and indeed in such an application views are derived from CCoeControl and implement the MCoeView interface at the same time.
And I can't say that something "feels wrong" by doing so.
René Brunner
Forum posts: 286
So if some one have to develop a simple application (with out view server support) still they need to override the MCoeView pure virtual function by your idea, which is not required
Cheers,
Sri
Forum posts: 11
I understand the framework part of it. I also understand the problems associated with diamond hierarchy and mixins, in general.
The problem is that it isn't intuitive. And for someone like me, who is learning Symbian programming as a hobby, it comes as a showstopper. So I wanted a feedback from the people who designed it the way it is..
Your response is appreciated..
Cheers...
Manu
Forum posts: 98
Forum posts: 49
http://www.geckim.com/symbian/symbian-articles/symbian-model-view-controller.aspx
Bye...