Nov. 17, 2014
10:38 a.m.
On 15 Nov 2014, at 10:41 , stepharo <stepharo@free.fr> wrote:
initializePresenter "Used to specify the subwidgets, and/or to bind them together" "By default, do not do anything"
extentHolder whenChangedDo: [:ex | self widget ifNotNil: [:widget | (widget respondsTo: #extent:) ifTrue: [ widget extent: ex ]]].
may be by design the ifNotNil should not be needed and the respondsTo too....
pffff.
I don't get it, doesn't the presenter already have an initialize: method that gets passed in its model? So a more "proper" thing to do is PresenterClassesThatCaresAboutExtent >> initializeFromModel: myModel myModel extentHolder when: ChangedValue do: [:ann | self extent: ann newValue] Cheers, Henry