swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] QSort and its compare function


From: Marcus G. Daniels
Subject: Re: [Swarm-Support] QSort and its compare function
Date: Fri, 11 Nov 2005 15:42:31 -0700
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)

Steve Railsback wrote:

a. QSort's method "sortObjectsIn()" method does not seem to work from Java- QSort does not seem able to use, by default, a compare method called "compare". (This DOES work in Objective-C Swarm.)

b. But when you use "sortObjectsIn$using()" and explicitly give it a comparison selector, the comparison method that the selector points to must not be called "compare".

It's really the same thing, and a bug. A method called `compare' is in the underlying Swarm object proxy (Objective C side), and QSort sends it directly to that proxy via -perform. It should get forwarded to the Java object. I don't think -perform has to behave that way for any performance reasons internal to Swarm, but I'd have contemplate the sources to be sure.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]