opening stack from subfolder
Richard Gaskin
ambassador at fourthworld.com
Sun Dec 12 18:09:32 EST 2004
Andre Garzia wrote:
> On Dec 12, 2004, at 8:58 PM, Bob Hartley wrote:
>
>> Hi All
>>
>> I'm finally getting there.
>>
>> OK I can call an external stack from a standalone.
>>
>> i used a button in a stabndalone (called start.exe) with the script
>> on mouseUp
>> go to stack test.rev
>> end mouseUp
>>
>> to open a stack called test.rev
>>
>> This works when test.rev is in the same folder as start.exe, however,
>> when I put test.rev in a folde called "bits" and use the script
>> on mouseUp
>> go to stack bits\test.rev
>> end mouseUp
>> or
>> on mouseUp
>> go to stack bits/test.rev
>> end mouseUp
>>
>> The test.rev file is not opend by the standalone.
What is the value of "the result" immediately after attempting to open
the file?
> try:
>
> go stack URL "file:bits/test.rev"
Bob may want to use "binfile" instead of "file", as the latter will
convert line endings which may invalidate the binary stack data.
Also, the two forms of opening stacks accomplish different things:
using the URL form copies it into RAM in a way that disassociates its
file name. If the stack is to be discarded or have some other file name
assigned to it that will be fine, but if I understand this correctly
attempting to use "save" on a stack opened with "go URL" will put an
error in the result.
Bob, I would put the stack path in quotes to be safe. Or perhaps
simpler, make an entry in the main stack's stackFiles property for this
other stack file:
myStack,bits/test.rev
...where MyStack is the name of the stack object in that stack file.
Then you can use the short form:
go stack myStack
--
Richard Gaskin
Fourth World Media Corporation
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list