Stacks Losing their Size and Location

Phil Davis revdev at pdslabs.net
Wed Dec 16 21:09:10 EST 2015


Hi Ray,

Another approach you could take:

     -- download the stack
     go invisible url serverStackPath
     put the name of this stack into tStack

     -- set the rect while stack is still hidden
     set the rect of tStack to the LastRect of tStack

     -- make it visible
     show tStack

     --- save the stack
     set the filename of tStack to localStackPath
     save tStack

HTH -
Phil Davis


On 12/16/15 5: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?
>
> On 12/16/2015 7:54 PM, Paul Dupuis wrote:
>> On 12/16/2015 7:40 PM, Ray wrote:
>>> So does anybody know how to set the default new stack size Livecode
>>> will use the next time a new stack is created, either by the menu
>>> choice or by simply opening a new disk file, writing to it and closing
>>> it?
>> See the entry for "templateStack" in the dictionary.
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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
>

-- 
Phil Davis





More information about the use-livecode mailing list