View Full Version : appending arrays


nebille
10 October 2005, 01:14 PM
Hi all

I am having a problem with arrays. There is an example below

-----------------------------
thearray = #()
For i = 1 to myset.count do
(
myobj = myset[i]
append thearray myobj
)
----------------------------

myset contains 10 teapots. When i use the append function only 1 teapot is added to the array.
Has anyone any ideas on how to get around this

regards

Nebille

Kenzor
10 October 2005, 01:52 PM
the code looks ok although it could also be written as

-----------------------------
thearray = #()
For obj in myset do
(
append thearray obj
)
----------------------------

which is a little quicker

try looking at myset in the listener window to see what it contains. I'm guessing it doesn't contain the data you expect it does.

CGTalk Moderation
10 October 2005, 01:52 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.


1