Re: LC7 arrayEncode/Decode

2015-05-04 Thread William Prothero
vecode-boun...@lists.runrev.com] On Behalf > Of William Prothero > Sent: Monday, May 04, 2015 2:43 PM > To: Use-livecode Use-livecode > Subject: Re: LC7 arrayEncode/Decode > > Richard: > You may be right about inconsistent formatting in the array. > I started the array with: >

RE: LC7 arrayEncode/Decode

2015-05-04 Thread Ralph DiMola
to:use-livecode-boun...@lists.runrev.com] On Behalf Of William Prothero Sent: Monday, May 04, 2015 2:43 PM To: Use-livecode Use-livecode Subject: Re: LC7 arrayEncode/Decode Richard: You may be right about inconsistent formatting in the array. I started the array with: put myVal into myArray[1][“name”

Re: LC7 arrayEncode/Decode

2015-05-04 Thread William Prothero
Richard: By the way, the fix was to do: put myVal into myArray[“1”][“name”] instead of myArray[1][“name”] Bill > On May 4, 2015, at 11:43 AM, William Prothero wrote: > > Richard: > You may be right about inconsistent formatting in the array. > I started the array with: > put myVal into myArray[1

Re: LC7 arrayEncode/Decode

2015-05-04 Thread William Prothero
Richard: You may be right about inconsistent formatting in the array. I started the array with: put myVal into myArray[1][“name”] Then later do: put myNextVa; into myArray[“i”][“name”], where i is an index in a repeat loop So, one would have an integer and the others would be a string of an intege

Re: LC7 arrayEncode/Decode

2015-05-03 Thread Peter Haworth
On Sun, May 3, 2015 at 12:53 PM, Richard Gaskin wrote: > Base64 might be useful for network transfer, but for local storage just > reading/writing in binary mode will be simpler, faster, and result in a > much smaller file. Thanks Richard. After my original post, I realized I didn't need the b

Re: LC7 arrayEncode/Decode

2015-05-03 Thread Richard Gaskin
William Prothero wrote: > I found an oddity with arrayEncode and arrayDecode, When I saved an > array to a file, first using arrayEncode(myArray), wrote it out as > > put arrayEncode(myArray) into theEncodedArray > put theEncodedArray into URL(“binfile:”&myfile) > > and then read it back in usin

Re: LC7 arrayEncode/Decode

2015-05-03 Thread Richard Gaskin
Peter Haworth wrote: > I haven't come across that yet but probably because I base64 encode > the array as well as array encode it and don't write to the file in > binary mode. Base64 might be useful for network transfer, but for local storage just reading/writing in binary mode will be simpler,

Re: LC7 arrayEncode/Decode

2015-05-02 Thread Peter M. Brigham
I have this in my library, s\collected at sone point from this list from Phil Davis. Don't know if this will still work on more recent versions of LC. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig - on arrayToFile pArray, pSaveToWhere -- saves an array t

Re: LC7 arrayEncode/Decode

2015-05-02 Thread Peter Haworth
I haven't come across that yet but probably because I base64 encode the array as well as array encode it and don't write to the file in binary mode. Which raises another question. I'm converting the app to 7.0 to be unicode compliant. The data in the array will have been textDecoded format. Do I

Re: LC7 arrayEncode/Decode

2015-05-02 Thread Mark Talluto
On May 2, 2015, at 5:06 PM, William Prothero wrote: > This seems like a bug to me. I didn’t get any satisfaction when I set the > storage method as text, but then again, I couldn’t find a lesson where that > format was specified. But, it seems like whether it’s binary or not, it > should still

Re: LC7 arrayEncode/Decode

2015-05-02 Thread William Prothero
I found an oddity with arrayEncode and arrayDecode, When I saved an array to a file, first using arrayEncode(myArray), wrote it out as put arrayEncode(myArray) into theEncodedArray put theEncodedArray into URL(“binfile:”&myfile) and then read it back in using put URL(“binfile:”&myFile) into th

Re: LC7 arrayEncode/Decode

2015-05-02 Thread Mark Talluto
On May 2, 2015, at 10:48 AM, Peter Haworth wrote: > However, there is no version parameter for the arrayDecode function. Does > this mean that LC7 can detect the encoding of the array and decode it > appropriately? Yes indeed! Best regards, Mark Talluto livecloud.io canelasoftware.com _