Storing an Array as a Custom Property
revdev at pdslabs.net
Fri Oct 1 12:21:19 CDT 2010
On 10/1/10 9:04 AM, Gregory Lypny wrote:
> Hi everyone,
> Page 236 of the LiveCode user guide says that arrays cannot be stored as single custom properties. Can anyone confirm this please? The reason I ask is that I thought that I had read in a past Rev newsletter that it was now possible, but I may be mistaken.
> I'm developing an app in LiveCode and have been saving uni-dimensional arrays as single customs props without apparent problems; however, it may be another story with multi-dimensional arrays.
For multi-dimensional arrays you need arrayEncode() and arrayDecode():
put "ice cream" into aMyFoods["favorites"]["desserts"]["cold"]
set the uMyFoods of stack "dataContainer" to arrayEncode(aMyFoods)
Professional Software Development
More information about the use-livecode