Yes, something like this :) Ben On Sep 21, 2013, at 9:17 PM, Camillo Bruni <camillobruni@gmail.com> wrote:
On 2013-09-21, at 16:11, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
What should be done is to first create some methods on ComposableModel like instantiateListModel, instantiateTextModel, etc so you hide at maximum the implementation details, and then you can do a more generic "self instantiate: MethodBrowser."
The first version of Spec was like this:
listModel := self instantiate: ListComposableModel. methodModel := self instantiate: MethodBrowser.
But then you find out there is always the same pattern, so Johan and I decided to introduce a way to encapsulate this.
Then of course, do whatever you want :P
actually true, something short like newButton / newList / newText ?