[sugar] [PATCH] (partial) AP palette patch
Thu Apr 10 03:31:12 EDT 2008
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.
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
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.
More information about the Sugar-devel