[Q] changed: update: for morphs
Martin Drautzburg
martin.drautzburg at web.de
Wed Mar 27 15:38:53 UTC 2002
No View superclass for morphs
I did some digging in the browser and I found the Classes
"Model" and "View". Model has a method changed: and View has a
method update:. I believe I basically understand this.
There are Classes like PluggableListView that inherit from
View. Still understandable. But there is also a
PluggableListMorph, that inherits from Morph. But Morph does
not implement an update: method and with single inheritance I
cannot additionally inherit from View. So how does a Model
inform a Morph about changes ? Do I just roll my own update:
Method for the morph ?
changed: for deletions
If a have a "container" object with its own associated view,
and one of the elements (all with their own views) of the
container gets removed, then what parameter would I pass to
the changed: method. I believe it would be most helpful for
the View to know *which* element is gone. It then would have
to ask all its element Views which one displays the deleted
element and delete the View. Is there a standard way of doing
this ? Would I do something like
changed: #(#deleted anElemenModel) ?
changed: update: standards
Are the parameters for changed: an internal affair between the
model and its view, i.e. I an free to chose any convention I
like or are there standards I should obey.
More information about the Squeak-dev
mailing list
|