Hi Lukas, I've no problem at all with the view creation. Indeed, the view creation is clean. Now, my point is about #shoutAboutToStyle: a PluggableTextMorph is passed as argument, so, from the model, one have a direct access to the view and to the view styler. So, the Model implementation can be broken if another view class is used instead of PluggableTextMorph. And what about the Inspector pane which has two text editors ? Only one has to be shouted. So how would you implement #shoutAboutToStyle: in this case ? Thanks Alain On 05/09/2011 09:06, Lukas Renggli wrote:
No, this is not strange. The view-creation code is completely separate from the model itself, even if it lives in the model class. The view creation code is never called from within the model and in fact could and should be packaged with the view. There are no references from the model to the view, multiple views can concurrently co-exist on the same model, and we can even support different view kinds at once (morphic, toolbuilder, seaside, ...) by creating different UI creation methods.
Lukas
On 5 September 2011 08:24, Alain Plantec<alain.plantec@yahoo.com> wrote:
right now the separation is bogus because to me a model should not refer to methods that cretae the UI. :) anyway. we will see that later.
yes, it is a bit strange to be allowed to directly manipulate a view element from them model. Alain