Navigating XML in LiveCode
Richard Gaskin
ambassador at fourthworld.com
Tue Jan 24 09:53:54 EST 2012
Graham Samuel wrote:
> However the real reason that I'm trying to go down the XML route is
> that I need this data to persist and I don't want the overhead of
> storing it in a stack rather than just keeping a trivial amount of
> text which furthermore could be easily examined/edited by non-LC
> programs.
XML is the way to go for inter-app data transfer, but FWIW if your app
was the only one using it you can save arrays to disk using
arrayEncode/arrayDecode:
global gMyArray
on LoadData pFile
put url ("binfile:"& pFile) into tData
put arrayDecode(tData) into gMyArray
end LoadData
on SaveData pFile
put arrayEncode(gMyArray) into tData
put tData into url ("binfile:" & pFile)
end SaveData
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
More information about the use-livecode
mailing list