Basic Morph question - updating
Colin Putney
cputney at wiresong.ca
Sun Feb 6 01:48:33 UTC 2005
On Feb 5, 2005, at 8:37 PM, Guenther Schmidt wrote:
> Stephan,
>
> that is a bit disappointing to be honest.
>
> A view polling its model is not what I like, I guess I'll stop right
> here and get back to Dolphin.
>
> The reason why I (briefly) checked back with Squeak was that in
> Dolphin you (seem) to have to use the standard widgets (while writing
> fancy UIs being very difficult) and I had seen some screenshots from
> the Exobox project that were really great.
>
> But when Morphic is about views polling their models in intervals,
> thanks but no thanks.
Well, you don't *have* to do it that way. Stepping is mostly useful for
animation. For more traditional widget-style things, the usual
technique is to use the dependency mechanism.
With PluggableListMorphs, for example, you register your model with the
list, and give it a selector that it will use to get the list of items
to display. Then when the list changes, you call self changed: with
that same selector as the parameter. The list will call that method,
get the new list items and update its display. No polling.
Most of the other widget-like morphs do the same thing.
Colin
More information about the Squeak-dev
mailing list
|