Stacks Losing their Size and Location

Paul Dupuis paul at researchware.com
Thu Dec 17 09:00:05 EST 2015


On 12/16/2015 8:05 PM, Ray wrote:
> Paul - excellent idea and thanks for this suggestion.  There's just
> one pitfall in my situation.  I'm doing this:
>
>    put url serverStackPath into stackData
>    open file localStackPath for binary write
>    write stackData to file localStackPath
>    close file localStackPath
>
> I've now created the 'virgin' stack but the rect it should be is
> stored as a property in it.  So the problem is the next line:
>
>    put the LastRect of stack localStackPath into stacksLastRect
>
> will effectively open the stack, thus assigning the templateStack's
> rectangle to it before I get a chance to change the rect of the
> templateStack.
>
> What do you think?

As an aside, you could probably shorten the above to:

 put url serverStackPath into url ("binfile:"&localStackPath) -- copy
stack from server to local storage

then I would do a variant of what Phil suggested, namely open the local
stack invisible, fetch the custom property "LastRect", set the stack's
rect to be what you want it to be, then save the stack. Or follow Phil's
suggested and open from the server invisibly, set the size, and save.






More information about the use-livecode mailing list