|
Re: [OT] Case insensitive comparison not stable ?: msg#00141lang.smalltalk.squeak.seaside
Francois Beausoleil wrote: >Hello everyone ! > >I know this is off-topic, but at least recognize a few names here :) > >Anyway, I can't seem to sort a set of objects represented by names >case insensitively. Here's what I have at the moment (some methods >omitted for brevity): > >Object subclass: #Author > instanceVariableNames: 'name email messages' > classVariableNames: '' > poolDictionaries: '' > category: 'Message-Board-Model'! > ><= other > ^ name caseInsensitiveLessOrEqual: (other name) > >Set subclass: #AuthorRepository > instanceVariableNames: '' > classVariableNames: '' > poolDictionaries: '' > category: 'Message-Board-Model'! > >sortedByName > ^ SortedCollection new addAll: self. > > > addAll: returns the argument, not the collection. You need: sortedByName ^SortedCollection new addAll: self; yourself David |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [OT] Case insensitive comparison not stable ?: 00141, Francois Beausoleil |
|---|---|
| Next by Date: | Re: [OT] Case insensitive comparison not stable ?: 00141, Francois Beausoleil |
| Previous by Thread: | [OT] Case insensitive comparison not stable ?i: 00141, Francois Beausoleil |
| Next by Thread: | Re: [OT] Case insensitive comparison not stable ?: 00141, Francois Beausoleil |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |