Re: [Gambas-user] gb3: sorting an array-like structure

2011-06-30 Thread Benoît Minisini
> On 05/24/2011 02:37 PM, Matti wrote: > > Hi Kevin, > > > > this sorting problem is (at least to me) still unsolved. > > I gave up and used a lousy workaround, reading the 2-dim array into a > > 1-dim string array like "field1/field2", then sorting this and reading > > the fields backward again.

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-24 Thread Matti
Hi Kevin, this sorting problem is (at least to me) still unsolved. I gave up and used a lousy workaround, reading the 2-dim array into a 1-dim string array like "field1/field2", then sorting this and reading the fields backward again. See Examples/Image/Lighttable, the sorting subs. Works ok wit

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-24 Thread Benoît Minisini
> Not sure, but I think Benoit means special method "_compare" which is used > (if exist) to sort objects. > http://gambasdoc.org/help/lang/special/compare?view > http://gambasdoc.org/help/comp/gb/object%5B%5D/sort?v3 > > Jussi > Yep, sorry, I meant that. -- Benoît Minisini --

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-24 Thread Jussi Lahtinen
Not sure, but I think Benoit means special method "_compare" which is used (if exist) to sort objects. http://gambasdoc.org/help/lang/special/compare?view http://gambasdoc.org/help/comp/gb/object%5B%5D/sort?v3 Jussi On Tue, May 24, 2011 at 05:22, Kevin Fishburne < kevinfishbu...@eightvirtues.co

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-23 Thread Bruce Bruen
On 24/05/11 11:52, Kevin Fishburne wrote: > On 05/23/2011 10:01 PM, Kevin Fishburne wrote: > >> On 05/09/2011 09:59 PM, Benoît Minisini wrote: >> Think of it like a spreadsheet instead of an array. I need each "row" sorted by the value in a "column". The two column values are >>

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-23 Thread Kevin Fishburne
On 05/23/2011 10:01 PM, Kevin Fishburne wrote: > On 05/09/2011 09:59 PM, Benoît Minisini wrote: >>> Think of it like a spreadsheet instead of an array. I need each "row" >>> sorted by the value in a "column". The two column values are >>> ObjectNumber and ObjectY and the row represents the array in

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-23 Thread Kevin Fishburne
On 05/09/2011 09:59 PM, Benoît Minisini wrote: >> Think of it like a spreadsheet instead of an array. I need each "row" >> sorted by the value in a "column". The two column values are >> ObjectNumber and ObjectY and the row represents the array index. >> >> There's got to be something like this in

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-09 Thread Benoît Minisini
> On 05/05/2011 07:50 AM, Fabien Bodard wrote: > > 2011/5/5 Kevin Fishburne: > >> On 05/05/2011 06:31 AM, Fabien Bodard wrote: > >>> We use that to sort icons in the iconview component > >>> > >>> take a look in the source > >>> > >>> trunk/comp/gb.form > >>> > >>> IconView.class > > > > it dep

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-09 Thread nando
Kevin Fishburne To: gambas-user@lists.sourceforge.net Sent: Mon, 09 May 2011 20:27:53 -0400 Subject: Re: [Gambas-user] gb3: sorting an array-like structure > On 05/05/2011 07:50 AM, Fabien Bodard wrote: > > 2011/5/5 Kevin Fishburne: > >> On 05/05/2011 06:31 AM, Fabien Bodard wrote

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-09 Thread Kevin Fishburne
On 05/05/2011 07:50 AM, Fabien Bodard wrote: > 2011/5/5 Kevin Fishburne: >> On 05/05/2011 06:31 AM, Fabien Bodard wrote: >>> We use that to sort icons in the iconview component >>> >>> take a look in the source >>> >>> trunk/comp/gb.form >>> >>> IconView.class >>> > > > it depend what you want to

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-05 Thread Fabien Bodard
2011/5/5 Kevin Fishburne : > On 05/05/2011 06:31 AM, Fabien Bodard wrote: >> We use that to sort icons in the iconview component >> >> take a look in the source >> >> trunk/comp/gb.form >> >> IconView.class >> it depend what you want to sort !!! say us please and more simply >> >> >> This use

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-05 Thread Kevin Fishburne
On 05/05/2011 06:31 AM, Fabien Bodard wrote: > We use that to sort icons in the iconview component > > take a look in the source > > trunk/comp/gb.form > > IconView.class > > > > This use the compare event and the comp function. to compare each > object text to sort the object in the array. > > htt

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-05 Thread Fabien Bodard
e --- > From: Kevin Fishburne > To: gambas-user@lists.sourceforge.net > Sent: Thu, 05 May 2011 01:46:22 -0400 > Subject: Re: [Gambas-user] gb3: sorting an array-like structure > >> On 05/05/2011 01:39 AM, nando wrote: >> > ? >> > Do you mean sorting [

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-04 Thread nando
@lists.sourceforge.net Sent: Thu, 05 May 2011 01:46:22 -0400 Subject: Re: [Gambas-user] gb3: sorting an array-like structure > On 05/05/2011 01:39 AM, nando wrote: > > ? > > Do you mean sorting [0, 1] to [1000, 1] > > Because the 1 is the second element of the second dimensi

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-04 Thread Kevin Fishburne
On 05/05/2011 01:39 AM, nando wrote: > ? > Do you mean sorting [0, 1] to [1000, 1] > Because the 1 is the second element of the second dimension > ?? We are misunderstanding each other. I know arrays start at zero when referencing their elements and dimensions outside of the declaration. By seco

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-04 Thread nando
? Do you mean sorting [0, 1] to [1000, 1] Because the 1 is the second element of the second dimension ?? -- Original Message --- From: Kevin Fishburne To: gambas-user@lists.sourceforge.net Sent: Thu, 05 May 2011 01:29:25 -0400 Subject: Re: [Gambas-user] gb3: sorting an array

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-04 Thread Kevin Fishburne
On 05/05/2011 01:19 AM, nando wrote: > Technically, anything is possible > Give an example of your data to sort perhaps? If I have an array of two dimensions [1000, 10] how would I sort it by the second element of the second dimension for example? -- Kevin Fishburne Eight Virtues www: http://sa

Re: [Gambas-user] gb3: sorting an array-like structure

2011-05-04 Thread nando
Technically, anything is possible Give an example of your data to sort perhaps? -- Original Message --- From: Kevin Fishburne To: gambas-user@lists.sourceforge.net Sent: Thu, 05 May 2011 00:00:25 -0400 Subject: [Gambas-user] gb3: sorting an array-like structure > Is it possi

[Gambas-user] gb3: sorting an array-like structure

2011-05-04 Thread Kevin Fishburne
Is it possible to sort an array (and/or something structurally similar to an array) by the values of a single dimension? -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sa...@eightvirtues.com phone: (770) 853-6271