realbasic-nug
[Top] [All Lists]

Re: How do you sort Object arrays?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: How do you sort Object arrays?
From: Phil M <phil at mobleybros dot com>
Date: Sat, 30 Sep 2006 15:11:26 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <003b01c6e4d5$77d01390$6401a8c0 at HP>
On Sep 30, 2006, at 2:14 PM, Walter Purvis wrote:

That's clever. I didn't even know there was a SortWith method! Perhaps because when it came out, I read the LR's lame example case, which is based on using separate arrays to hold the different columns of a table of data (a strategy I couldn't ever see myself using, at least not until senile dementia sets in), and promptly put SortWith out of my mind as something unlikely to ever be useful.

When I first tried sorting objects using SortWith() I was actually very surprised it worked.

For one the documentation for SortWith states that it only works with Double, Integer Single and String... I was expecting a compile error that an Object array is not a valid parameter.

The second surprise was that Extends works with array types.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>