Ok.. First time using sort and I'm stumped..

I've got a collection of associations that look
kinda like this :

    [1]: './foo'->true
    [2]: './bar'->false
    [3]: './baz/->false

I want to sort them so the entry in the collection
with the 'true' association value is at the end --
so after sorting it should look like :

    [1]: './bar'->false
    [2]: './baz/->false
    [3]: './foo'->true

But when I execute something like that shown
below it always returns the same thing -- namely
no change..  I even tried hard-coding ^false when
it was only 2 entries and it made no difference..
Any ideas?

myCollection sort: [:a :b |
   a value ifTrue: [^false ].
   ^true.
].
myCollection inspect



_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to