[UI] ToolBuilder

Igor Stasenko siguctua at gmail.com
Wed Sep 12 16:41:33 UTC 2007


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.


More information about the UI mailing list