Page 1 of 1

Passing an array from a library?

Posted: Fri Jan 20, 2012 11:34 pm
by kcorey
I'm not sure I am understanding how this is supposed to work properly...

I have a button whose script calls a library function on the card. The library function does its job asynchronously.

When it's done, its data is collected in an array. The array is declared a local in the library's card, but I'd like to pass that back to the caller. In objectiveC, it'd be an autoreleased variable.

What's the way to do this sort of thing in LiveCode? (Should I be doing things this way at all)?

-Ken

Re: Passing an array from a library?

Posted: Fri Jan 20, 2012 11:45 pm
by mwieder
ArrayEncode and ArrayDecode are your friends. Unfortunately you can't send arrays directly without encoding them first.