New topic: Sorting on Key
<http://forums.realsoftware.com/viewtopic.php?t=45598> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message macmage Post subject: Sorting on KeyPosted: Sat Oct 13, 2012 9:21 am Joined: Fri Apr 21, 2006 7:11 pm Posts: 71 Location: Cincinnati, OH I need to build what is essential an associative array and sort on the key. I know I can use a collection or dictionary to hold the data. I know I can write my own bubble sort to sort it, but is there something already built into RB that will do the sorting for me? Top npalardy Post subject: Re: Sorting on KeyPosted: Sat Oct 13, 2012 11:31 am Real Software Engineer Joined: Sat Dec 24, 2005 8:18 pm Posts: 7479 Location: Canada, Alberta, Near Red Deer Really depends on your data & how you intend to sort it Array's have a sort method & you can sort another array in conjunction with the firs t( see sortwith) _________________ My web site Great White Software RBLibrary.com REALbasic learning Top macmage Post subject: Re: Sorting on KeyPosted: Sat Oct 13, 2012 12:40 pm Joined: Fri Apr 21, 2006 7:11 pm Posts: 71 Location: Cincinnati, OH Essentially the key would be a time expressed as a string (i.e. HH:MM:SS) and the value just a string. I'm pulling from two different database tables but want the overall results sorted in reverse order by the time the entries went into the database. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
