All in all, Spec is *much* easier to work with than PolyMorph directly. The builder alone makes for much less code, as we only have to specify the attributes we care about. Ben, thanks for all the great work so far!
While pushing on it, I ran into a few problems...
1. Issue 6547: [BUG Spec]: Populating a MultiColumnListModel
http://code.google.com/p/pharo/issues/detail?id=6547The following only populates runListModel if the final line is uncommented. It took quite a long time to figure out why nothing was appearing in the list! Apparently, this is an issue with MultiColumnListModel because ListComposableModels get populated w/o the update:
initializeWidgets
self instantiateModels: #(
runListModel MultiColumnListModel).
runListModel
items: self model runs;
menu: [ :aMenu | self runMenu: aMenu ];
displayBlock: [ :e | self wrapItem: e ].
" WorldState addDeferredUIMessage: [ runListModel updateList ]."
2. Issue 6546: [BUG Spec 1.4]: Menus don't forward action to model
http://code.google.com/p/pharo/issues/detail?id=6546 Model>>perform: selector orSendTo: otherTarget
^ otherTarget perform: selector.
In Pharo 2.0, #perform:orSendTo: has been moved to Object and does what it says it will. I copied that implementation to ComposableModel. It should probably be in a 1.4 platform package (although I guess there'd be little harm in adding across the board, save the duplication).
3. MultiColumnListModel sounds really cool, but seems to be in alpha. To be generally useful, it would have to have a feature set similar to Mac Finder. That is, for example:
* a header row
* resizable columns
* editable cells (but only the ones you want to be editable)
Cheers,
Sean
p.s. I still can't get Spec 1.1 to load in Pharo 1.4
Cheers,
Sean