ListToArray ??

BlitzMax Forums/BlitzMax Beginners Area/ListToArray ??

Chroma(Posted 2007) [#1]
Having trouble on how to use this command since there's no actual example in the docs.

My list is populated. I just want to quick change it into an array.

myArray[] = ListToArray[](myList)

What am I missing?


Derron(Posted 2007) [#2]
What about:

myArray = MyList.ToArray()


bye
MB


Gabriel(Posted 2007) [#3]
Or the non-OOP version you had originally :

Local List:TList
Local Array:Object[]
Array = ListToArray(myList)



Chroma(Posted 2007) [#4]
Ended up going with:
Local array:Object[] = list.ToArray()
TMyType(array[0]).life = 100

If the docs had even a one liner with stuff like this it'd cut dev time down by probably 50%.


Dreamora(Posted 2007) [#5]
Doing Assari's tutorial cuts the dev time wasted by 80% and the time spend on answering things that have a tutorial on his page by about 100%, so a Win-Win