MethodBrowser works without that initialize (and uses
initializeWidgets for the instantiation) where ClassMethodBrowser
requires one (doesnt work without as models are nil).

ClassMethodBrowser>>initialize
        "Initialization code for ClassMethodBrowser"

        super initialize.

        listModel := self instantiate: ListComposableModel.
        methodModel := self instantiate: MethodBrowser.
        
        self focusOrder
                add: listModel;
                add: methodModel.
        
        listModel whenSelectedItemChanged: [:selection |
                selection
                        ifNotNil: [:class |
                                methodModel methods: (class methodDict values 
sort: [:a :b | a
selector < b selector]).
                                methodModel listModel resetSelection ]].
        
        methodModel wrapWith: [:method | method selector ].

And

ClassMethodBrowser>>initializeWidgets

        self instantiateModels: #(
                listModel ListComposableModel
                methodModel MethodBrowser ).
        
        self focusOrder
                add: listModel;
                add: methodModel.
        
        methodModel displayBlock: [:method | method selector ].

has the instantiateModels.

There seems to be a double instantiation in here...

What is the right way to proceed? The Spec Report of June 2012 and the
Spec tex thing in the SCM aren't right, so I wonder what the right way
to do things is.

TIA

Phil

Reply via email to