Status: Fixed
Owner: [email protected]

New issue 3792 by [email protected]: PluggableListMorph with a wrapper for display
http://code.google.com/p/pharo/issues/detail?id=3792

I now provide a way (or maybe Alain will said it already exists ^^) to change the way item are displayed using the method wrapSelector: aSymbol where aSymbol is the name of a one argument method.

That way, you can store real Object (not Strings), and change the way items are displayed

=============================================================

Example:

buildList

        list := PluggableListMorph
                                on: self
                                list: #getList
                                selected: #selected
                                changeSelected: #selected:.
        list wrapSelector: #listWrapper:.
        ^ list

where:

listWrapper: anElement

        ^ anElement name

Here anElement is the raw item from the list.

Attachments:
        PluggableListMorphWithWrapper.2.cs  2.2 KB


Reply via email to