On Thursday 30 May 2002 10:50 am, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > | Well I can't make much sense of the title and there's no explanation > | attached to the patch. WIP? > | > >>From what I can see: > | > | * You pass a ButtonController to the ControlButtons c-tor. > | Seems sensible. > > Likely that it will change a bit. > > | * You have commented out every single call to view() by any controller. > | Why? What are you trying to do? > > I have not found the way to get to the view from the controller yet.
Why not do as you suggested yesterday template< typename Controller, typename View, ...> class GUI: public DialogBase { GUI(Controller & c, View & v, ...) : c_(c), v_(v), ... { c_.setView(&v_); v_.setController(&c_); } Controller c_; View v_; }; Then the Controller could have a ViewBase & view() const method etc. Incidentally, it'd be nice if we could templatise ViewBase's controller() method to return the actual type of the controller. At the moment this is done higher up the inheritence tree. Dunno if this can be made to work, however... > | * You have #included the .tmpl instantiations in their reapective header > | files. > | Why? Is this a "let's get it working first" type of change? > > No, it is imho the right thing to do. > (while we wait for export) More explanation please. What's "export"? > | * The form_xxx.h files are still #included by Dialogs.C. Try and get rid > | of them; they are only there because the old boost::scoped_ptr wanted > | them. > > correct, and I belive they are still needed. Not in my wrappers tree they're not. Admittedly I have been using a std::auto_ptr<> const to store them. I was hoping to be able to return to a boost smart ptr though. Angus > > | Angus > | > | ps. Some words to go with the patch would be good next time ;-) > > There were words.... somthing deleted them... > > In those words I wondered how the communication between Controller and > View is supposed to be.