This content has been marked as final. Show 12 replies
New problem- I am trying to record an array that grows over time. Within the looping script, new info keeps getting pushed to the back of the array, and at the end of each loop I'd like to record the array. The problem is (as most of you will already know) is that simply throwing the array variable inside of writeString does not produce very good results. It results in spitting out a bunch of numbers, not nicely sorted data with brackets, comman and spaces. Is there an easy method to dealing with this.
Any help is appreciated.
If aBigArray1 is a Director List or some other data type, you'll need to
convert it to a string.
> myXtra.writeString(aBigArray1)--This appears to convert the array to an
And when reading it back in, use value() to convert it back to a list.
If you don't actually need that file to be readable by a text reader, you may
want to look into using the vList or propSave Xtras. They can save/load
Director lists (and other dataTypes) directly to a file with no conversions
propSave is free and, IIRC, vList is free for this particular feature.
Mark A. Boyd
Thanks for the response. I don't need the data saved to the text file to be pretty, just useable. Basically I am running one projector to record a bunch of results, and those results will then need to be imported into another projector and played back.
I will look into vList and propSave.
adam@blueapplestudio posted in macromedia.director.basics:
> Thanks for the response. I don't need the data saved to the text file
> to be
> pretty, just useable. Basically I am running one projector to record a
> bunch of results, and those results will then need to be imported into
> another projector and played back.
> I will look into vList and propSave.
don't do it for you, I'm sure there's a JS equivalent for converting arrays
to strings and back again.
Mark A. Boyd
I have a function that will convert my arrays to lists, and then the lists are saved using saveProps. However, some of my arrays are multi-dimensional and it doesn't appear that Lingo lists support this. Is this correct? I have tried a few tests and I seem to get "#unknown" as output.
Is there a workaround to create multi-dimensional lists, or is there a way to write multi-dimensional arrays directly to disc before converting them to lists?
Apologies for the above post. I've done a bit more research and think I see the right syntax for the multidimensional list.
I'm having a bit of trouble writing this function. The goal is to go through a multidimensional array and create a list that mirrors it.
The hang up is happening when I try to create a new nested list. Anyone have any thoughts?
I could be mistaken or not understanding, but can you not just use the
The duplicate function does not appear to work on arrays, only on lists.
I'm having trouble testing to see if the individul elements are strings, numbers, or other arrays. There doesn't appear to be an IsArray() function, how would you folks recommend I check for this?
Lingo has the ilk function, which returns the type of an object (string,
integer, list, etc).