On Fri, Mar 5, 2010 at 10:04 AM, Martin Renold <[email protected]> wrote:

> On Thu, Mar 04, 2010 at 09:54:12PM +0100, Jon Nordby wrote:
> > Playing the devils advocate here. One alternative we have here is to not
> > inherit from lib.document.Document, but instead let it have a reference
> to
> > it, probably self.model
> > It might be better with respect to encapsulation, in the sense that is
> > obvious when you're groping at internals (self.app.doc.model.something).
> > What do you think?
>
> We have discussed this before; I am slightly in favour of explicit
> references instead of inheritance.  But it's not a dogma (TiledSurface also
> uses inheritance), and maybe inheritance works better here.
>
> You have given this more thought than me by now, and I don't see anything
> obviously wrong, either way.  If it turns out bad we can change it again
> later as we learn more.
>
I've changed it to using explicit reference instead of inheritance now,
fixed up the tests and squashed to a single commit:
http://gitorious.org/~jonnor/mypaint/jonnors-clone/commits/gui_document2

Pushing to master in a couple of days if there are no major issues.

-- 
Regards Jon Nordby - www.jonnor.com
_______________________________________________
Mypaint-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-discuss

Reply via email to