Determine the LC version of an existing stack

Mike Bonner bonnmike at gmail.com
Tue Dec 16 14:43:20 EST 2014


Got it.

In 7.0, first do this..

put the cRevGeneral["stackfileversion"] of stack "stackname"  If its empty,
it means it was created in an earlier version of LC, and hasn't been saved
using "save as legacy whatever" at any point.

SO if that one is empty then get revstackfileversion(the filename of stack
"stackname") which I believe does as mentioned and checks the first bytes.
However, if the file was created in 7, the first method works, and if a
stack is created with 7 and then saved as, the
cRevGeneral["stackfileversion"] of the property is updated and will contain
the version.

Ah k. 6.6.2 does not have revstackfileversion(), but new stacks created
with 6.6.2 have the cRevGeneral["stackfileversion"] property, so it should
work fine. (I think) Tho I was recently sent a version that had the 5.5
format, and it did NOT have the property set.  7 was able to get the
version with its revstackfile() function.

On Tue, Dec 16, 2014 at 12:25 PM, J. Landman Gay <jacque at hyperactivesw.com>
wrote:
>
> On 12/16/2014, 12:18 PM, Mike Bonner wrote:
>
>> IF I can dig up how
>> the engine tracks the version for stacks, i'll letcha know.
>>
>
> I'm pretty sure it must be reading the first few bytes of the file, like
> Klaus said. As far as I know, that's the only place the info is stored.
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the Use-livecode mailing list