Char Set on Custom Properties

J. Landman Gay jacque at hyperactivesw.com
Fri Sep 4 14:38:44 EDT 2015


On 9/4/2015 7:57 AM, Mark Waddingham wrote:
>  From what you are saying you want people to be able to edit content in
> both LC6 and LC7, the content itself being saved in LC6 format. i.e. You
> want to move your system forward to LC7, but you need to still support
> LC6 clients and editors. Is that correct?

Pretty much. There are hundreds of stacks out in the field, in use by 
end users. We're starting to move to LC 7 and I'll build an app 
eventually with that version, which all users will update to. New stacks 
created from now on will be made in LC7 (if all goes well; there are 
some issues I'll be reporting.) The LC7 app can read both the existing 
LC6 stacks and the new LC7 stacks, which is good, but my scripts need to 
know whether to use MacToISO() or not before displaying the text.

>
> Now, LC7 will assume that custom property values coming from LC6 format
> stacks are binary data thus won't do anything magical with them.
> However, as soon as you pass that value through anything text-related in
> LC7 and set the custom property back, it will be (in memory at least)
> stored as text. Then, when you save the stackfile in LC6 format the
> engine will convert the text to the platform encoding and save as binary
> (which is what LC6 expects).

Right, I think I understand that part. The problem is that we have many 
LC6 stacks in use and new LC7 ones coming out, so the scripts need to 
know which type they're working with. It sounds like the engine bases 
its decision on the stackfileVersion saved with any particular stack, 
which would be fine for me too if we could access that, but right now 
its only a global property. I could really use a "stackfileVersion of 
this stack" command right now. That would solve the problem.

Barring that, I thought of reading a sequence of bytes from the stack 
file, but I can't because these stacks are streamed remotely and have no 
filename. I don't believe there's way to read the raw binary content of 
a stack in RAM, so I'm kind of stuck.

Is there some kind of scripted test that might determine the 
stackfileVersion of any particular stack in RAM?

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list