[UI] ToolBuilder

Jason Johnson jason.johnson.081 at gmail.com
Wed Sep 12 16:56:17 UTC 2007


Personally I think I would prefer to use a decorator pattern then
Traits for this.  The issue is that Traits can easily be accidentally
used to implement multiple inheritance which is bad.  This is not the
only thing they can be used for, but I think what ever we build will
be really important so it's best to not use such features unless we
really do need it.  Anyone reading OO books on building GUI's is going
to be expecting decoration here, not Traits.

On 9/12/07, Igor Stasenko <siguctua at gmail.com> wrote:
> On 12/09/2007, Gary Chambers <gazzaguru2 at btinternet.com> wrote:
> > I expect supporting the scrolling would have been more work and not benefit
> > from improvements to the ScrollPane class. Delegation "should" have looked
> > straightforward... Better to compose than rewrite with potential
> > inconsitencies!
> >
>
> Aha, so it looks like a composition of different morphs/interfaces.
> It seems done only for bringing textMorph interface to the front, so
> users of PluggableTextMorph can deal with text without traveling
> through morphs hierarchy (ScrollPane->TransformMorph->TextMorph).
>
> Interesting, how this can be achieved in more clean and generic way?
> I'm just thinking of using traits. Suppose we have a trait like
> "PluggableText", which relies on single message 'self textMorph' and
> exposes TextMorph interface to class where trait is used. Then we can
> easily have interface compositions like ScrollPane + TextMorph or
> AnythingElse + TextMorph.
>
> --
> Best regards,
> Igor Stasenko AKA sig.
> _______________________________________________
> UI mailing list
> UI at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/ui
>


More information about the UI mailing list