eric at canelasoftware.com
Thu Feb 19 16:06:13 EST 2015
The dictionary may be a bit inaccurate. In LC 7, if there is no version, arrayEncode uses the encoding for the version you are on, LC 7 encoding. So, if LC 8 has different encoding than 7, LC 8 will use LC 8 encoding when no version is specified.
On Feb 19, 2015, at 12:49 PM, Peter Haworth <pete at lcsql.com> wrote:
> Thanks Eric, yes that does indeed help. However, I'm still confused. The
> dictionary indicates that if the new parameter, version, is not present
> then arrays are encoded the old way. None of my calls include the new
> parameter so not sure how they ended up being inaccessible in pre7 versions.
> I guess the gist of my post was what else have I failed to account for? Is
> there a document somewhere that details what code structures may need
> attention when moving back and forth between LC7 and prior versions? I'm
> guessing that anything addressing char chunks or offset would need to be
> On Thu Feb 19 2015 at 12:31:24 PM Eric Corbett <eric at canelasoftware.com>
>> Not sure if this helps, but LiveCode 7 uses a different arrayEncoding than
>> previous version due to Unicode. Check the dictionary on how to use
>> arrayEncode in 7 to be able to decode in an earlier version.
>> On Feb 19, 2015, at 12:16 PM, Peter Haworth <pete at lcsql.com> wrote:
>>> I've been careful to create separate versions of my stack files and
>>> Livecode Preferences folder for use when running LC 7. However, it seems
>>> there other issues with compatibility.
>>> I save the preferences for my application in a file in the
>>> /Library/Application Support folder with the following statement:
>>> *write* base64Encode(arrayEncode(gSettings)) to file <filepath>"
>>> These are then read in at startup with:
>>> read from file myPath until EOF
>>> if it is empty then
>>> put empty into gSettings
>>> put arrayDecode(base64Decode(it)) into gSettings
>>> end if
>>> Yesterday, I started working on this stack with LC7 and the prefs file
>>> saved by the LC7 version of the stack.
>>> Today, I needed to go back to the non LC7 version of the stack. To my
>>> surprise, a runtime error was thrown on the "put arrayDecode..."
>>> above. The it variable looked like it contained base64 encoded data.
>>> I ran the LC7 version of the stack again and the runtime error did not
>>> I restored the preferences file from a Time Machine backup that I know
>>> preceded my use of LC7, ran the application again with LC 6.6.2, and all
>>> worked fine.
>>> So it seems that something in either the array/base64 encode/decode
>>> functions changed between v6.6.2 and 7.0.1.
>>> I really want to use LC7 but stuff like this makes me very nervous. How
>>> many other inconsistencies like this are lurking out there.
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode