have a look at the code, the point is that as a class you do not want to let the user decide how to interpret you. You can say there are three ways to change me 1, 2, 3 but not how you decided internally to represent them. I just made asDictionaryByDateAscendingSelector = a choice like 1 the client does not have to know that this is #asDictionaryByDateAscending. It could be anything else. Setf On Aug 13, 2010, at 8:44 PM, Benjamin Van Ryseghem wrote:
MessageListBrowser >>byDateAscendingOn: aMessageList
^self on: aMessageList withADictionarySelector: aMessageList asDictionaryByDateAscendingSelector
and
MessageList>> asDictionaryByDateAscendingSelector ^ #asDictionaryByDateAscending
=> encapsulate information from model to UI. => I did it
I do not understand :s