Hi Romain,
#sorted: expects a block with 2 arguments, such as:
aCollection sorted: [:e1 :e2 | e1 staticNeededPackages size < e2
staticNeededPackages size]
which will sort the elements ascending.
For more examples, just search for the senders of the selector #sorted:
Cheers,
Ricky
On Apr 16, 2008, at 11:55 AM, Romain PEIRS wrote:
Hi everybody !
I’m working on the method MooseModel >> packagesDSM and I noticed
that the
message sorted: sent to an OrderedCollection doesn’t sort anything!
I also tried with a simple condition of sort: p1staticNeededPackages
size
p2staticNeededPackages size
I don’t
understand why the OrderedCollection is not sorted.
Have I forgot anything?
Thanks
Romain
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev