Display a 2d array
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Display a 2d array
I have been trying to display a 2d array in a table field. I've tried to combine my array in order to do this but I haven't found out how.
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Display a 2d array
What does your "combine" statement look like?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Display a 2d array
Hi.
A table field cannot hold a two-dimensional array. It isn't, er, "big" enough. Just so I make sure I understand you, on a new card make a button and a table field. Put this into the button script:
This generates a list of ten numbers and their doubles, and loads them into a table field. But a two dimensional array has an extra layer, or dimension if you wish, and where would it "fit" into a table field?
Do I have any of this right?
Craig Newman
A table field cannot hold a two-dimensional array. It isn't, er, "big" enough. Just so I make sure I understand you, on a new card make a button and a table field. Put this into the button script:
Code: Select all
on mouseup
put "" into fld 1
repeat with y = 1 to 10
put 2 * y into tArray[y}
end repeat
combine tArray with return and tab
sort tArray numeric
put tArray into fld 1
end mouseup
Do I have any of this right?
Craig Newman