[Cuis] PluggableListMorph
Dan Norton
dnorton at mindspring.com
Mon Oct 26 15:58:12 CDT 2015
Hello All,
Please review the following for accuracy. It's not complete. It's a start on a "Principles of
Operation" for applying PluggableListMorph for fun and profit. Maybe it should be called
"PluggableListMorph for Dummies". I'm especially interested in whether you agree with the
"coincidental" statement.
PluggableListMorph is designed to work as part of one or more views on a model in the MVC
paradigm (Note 1). The model is not directly aware of the existence of any view; instead, it
signals changes in itself by broadcasting symbols with the #changed: method. In this way,
any view which is related to the model can detect the changes by examining the symbol in its
#update: method. Thus while the model is not explicitly aware of a view, there is an implicit
relationship in that a view must know the significance of the symbols broadcast by the model
in order to respond appropriately. Views are dependents of a model and therefore the model
is a sponsor of views. Use of the #changed: and #update: methods is the essence of the
Smalltalk dependency mechanism (Inside II).
The model sends #changed: and as a result, all dependents (e.g. views) on it receive
#update:. In the #update: method, the view examines the symbol and decides what, if
anything, to do. While the symbol is, in practice, often identical to the name of a method, this
is coincidental and unfortunately a source of confusion and misdirection.
Note 1. The MVC paradigm is mentioned here for historical context. PluggableListMorph can
also be employed in other design schemes.
Inside II. LaLonde and Pugh, "Inside Smalltalk, Volume II"
Thanks,
- Dan
More information about the Cuis
mailing list