[sugar] [PATCH] (partial) AP palette patch
Marco Pesenti Gritti
Thu Apr 10 04:32:17 EDT 2008
If I remember correctly icon is a a Palette property so why not just
access it through the property...
On Thu, Apr 10, 2008 at 9:31 AM, Tomeu Vizoso <tomeu at tomeuvizoso.net> wrote:
> On Thu, Apr 10, 2008 at 12:53 AM, Eben Eliason <eben.eliason at gmail.com> wrote:
> > > What do you mean here?
> > > + self.props.icon_name = icon_name
> > > + # This breaks style guidelines; we should store a reference
> > > + self._palette._icon.props.icon_name = icon_name
> > I'm accessing the private _icon member of the palette class, rather
> > than keeping a reference to it to use for this purpose. It was a
> > quick hack.
> This is not breaking style guidelines, but encapsulation, which is a
> basic concept when designing object-oriented APIs.
> Related links:
> I think we should only push hacks like this to master repositories in
> cases of emergency when refactoring is not an option (very close to
> release date).
> Also, if you have felt the need to do such a thing, means that our API
> has a problem somewhere that should be solved ASAP.
> Sugar mailing list
> Sugar at lists.laptop.org
More information about the Sugar-devel