PDA

View Full Version : multidimensional array



akiaztyl3
March 11th, 2004, 10:27 AM
Hi, :goatee: i have some problem witha multidimensional array.
Now explain:

I've create a structure like a Table, the data are take from a bidimensional array. :te: I want include some button to order by a column for example order by code, name etc. :huh:

For ordering array i use sortOn() command but the result is anomalous, some time there is a change between 2 column and other time the array is the same in the same order. :red:

Someone can help me please. :)

P.S. Sorry for my english, i hope to be right.

Nice

Seticus
March 11th, 2004, 01:08 PM
could you give us the code that you are using...

akiaztyl3
March 11th, 2004, 01:16 PM
Creation & data inseriment:

_level0.dverificatori = [[], [], [], [], [], []];
for (k=0; k<ida.length-1; k++) {
_level0.dverificatori[0][k] = ida[k];
_level0.dverificatori[1][k] = nom[k];
_level0.dverificatori[2][k] = des[k];
_level0.dverificatori[3][k] = loc[k];
_level0.dverificatori[4][k] = pro[k];
_level0.dverificatori[5][k] = pai[k];
}


sorting code:

_level0.dazienda.sortOn(_root.ordine)

i hope is necessary

Seticus
March 17th, 2004, 08:43 AM
I have no idea what you're trying to do

"_level0.dazienda.sortOn(_root.ordine)"

what is _level0.dazienda and what is _root.ordine? It's not in the script"

RoboLlama
March 17th, 2004, 03:25 PM
Well... the variables can be translated from Italian to English as follows:

dverificatori = d_verifiers
dazienda = d_company
ordine = order
ida = ?
nom = name?
des = destination?
loc = location?
pro = ?
pai = country?


Now I'll try to look at the code

Seticus
March 17th, 2004, 03:30 PM
and what value do they get? they are not defined in the script you posted

shouldn't it be _level0.dverificatori you want to sort instead of _level0.dazienda

RoboLlama
March 17th, 2004, 03:32 PM
Yeah he didn't really give us enough information