Re: Controler/View

2003-03-06 Thread Andre Poenitz
On Thu, Mar 06, 2003 at 03:10:15PM +, Angus Leeming wrote: > which will compile fine. However FormTabular expects to see > ControlTabular & controller() { > dynamic_cast(dialog().controller()); > } > which fails at run time because the dialog actually has a > Co

Re: Controler/View

2003-03-06 Thread Angus Leeming
Andre Poenitz wrote: > On Thu, Mar 06, 2003 at 02:44:10PM +, Angus Leeming wrote: >> // Lazy instatiation. Only build the thing when a particular >> // dialog is requested. >> Dialog * Dialogs::build(string const & name) { >> if (!isValid(name)) >> return 0; >> >>

Re: Controler/View

2003-03-06 Thread Andre Poenitz
On Thu, Mar 06, 2003 at 02:44:10PM +, Angus Leeming wrote: > // Lazy instatiation. Only build the thing when a particular > // dialog is requested. > Dialog * Dialogs::build(string const & name) { > if (!isValid(name)) > return 0; > > Dialog * dialog = new Dialo

Re: Controler/View

2003-03-06 Thread Angus Leeming
Andre Poenitz wrote: > On Thu, Mar 06, 2003 at 02:17:48PM +, Angus Leeming wrote: >> Do things become clearer? > > Not sure. > > But > > ViewCitation(Dialog & parent) : ViewBase(parent) {} > virtual void printcontroller() { > std::cout << "ViewCitation's controller

Re: Controler/View

2003-03-06 Thread Andre Poenitz
On Thu, Mar 06, 2003 at 02:17:48PM +, Angus Leeming wrote: > Do things become clearer? Not sure. But ViewCitation(Dialog & parent) : ViewBase(parent) {} virtual void printcontroller() { std::cout << "ViewCitation's controller is " << getController().whoami()

Re: Controler/View

2003-03-06 Thread Angus Leeming
Andre Poenitz wrote: > On Thu, Mar 06, 2003 at 01:20:00PM +, Angus Leeming wrote: >> > Hm.. what's the relation between Controlers and Views? 1:1, 1:n >> > or something different? >> >> Each dialog has one controller and one view. > > Can one View view different Controlers? Not often. Howe

Re: Controler/View

2003-03-06 Thread Andre Poenitz
On Thu, Mar 06, 2003 at 01:20:00PM +, Angus Leeming wrote: > > Hm.. what's the relation between Controlers and Views? 1:1, 1:n or > > something different? > > Each dialog has one controller and one view. Can one View view different Controlers? Can one View view different controler types? Is

Re: Controler/View

2003-03-06 Thread Angus Leeming
Andre Poenitz wrote: > On Thu, Mar 06, 2003 at 01:54:44PM +0100, Andre' Poenitz wrote: >> You need in the View access to the Controler without making all >> possible controler functions virtual in the ViewBase? > > Hm.. what's the relation between Controlers and Views? 1:1, 1:n or > something di

Re: Controler/View

2003-03-06 Thread Angus Leeming
Andre Poenitz wrote: > On Thu, Mar 06, 2003 at 01:00:33PM +, Angus Leeming wrote: >> Andre Poenitz wrote: >> >> > >> > Any problem with attached solution? >> >> You mean virtual printcontroller() ? > > A virtual "whoami". > >> In this case no. More generally yes since the different contro

Re: Controler/View

2003-03-06 Thread Andre Poenitz
On Thu, Mar 06, 2003 at 01:54:44PM +0100, Andre' Poenitz wrote: > You need in the View access to the Controler without making all possible > controler functions virtual in the ViewBase? Hm.. what's the relation between Controlers and Views? 1:1, 1:n or something different? Andre' -- Those who d

Re: Controler/View

2003-03-06 Thread Andre Poenitz
On Thu, Mar 06, 2003 at 01:00:33PM +, Angus Leeming wrote: > Andre Poenitz wrote: > > > > > Any problem with attached solution? > > You mean virtual printcontroller() ? A virtual "whoami". > In this case no. More generally yes since the different controllers > have very different contents

Re: Controler/View

2003-03-06 Thread Angus Leeming
Andre Poenitz wrote: > > Any problem with attached solution? You mean virtual printcontroller() ? In this case no. More generally yes since the different controllers have very different contents. Eg it doesn't make much sense to have vector & getListofCitations(); in ControlTabular.

Controler/View

2003-03-06 Thread Andre Poenitz
Any problem with attached solution? Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson) #include #include class ControllerBase; class ViewBase; class Dialog { public: Dialog() : c_(0), v_(0) {}