Unable to go to another stack in Windows

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
astroboy
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 30
Joined: Wed Apr 09, 2008 8:05 pm

Unable to go to another stack in Windows

Post by astroboy » Sun Nov 02, 2008 8:49 am

Hi fellas!

I have a program that goes to a specified card in a stack. The standalone works just fine in Linux and OS X, but in Windows it does not work.

The code to obtain current path of a stack is:

-------------
on preOpenStack
global gPath

if gPath is empty then
put the filename of this stack into gPath
repeat while last char of gPath is not "/"
clear last char of gPath
end repeat
end if
end preOpenStack
-----------


And in a button the script to go to a card in the other stack is:

---------
on mouseUp
global gPath

answer gPath&"module3/module3"

close this stack
go to card 4 of stack gPath&"module3/module3.rev"
end mouseUp
---------

(The "answer" line was put for debugging info, and yes, the module3 directoy does exist, as well the stack named "module3.rev"...)

In Windows, the stack correctly go to "module3" stack, if run inside the IDE. But, if I make an exe standalone, the standalone does nothing. The answer line even puts correctly the path of the "module3" stack, but it does not go to the card requested. I even tried removing the line "close this stack", but the standalone does nothing with that change, too.

Why I can't go to the card of another stack in a Windows standalone? Am I missing something?

Thanks in advance,

Alex

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Sun Nov 02, 2008 10:46 am

I've not investigated but my first guess is the file path delimiter in Windows being a backslash, not forward slash.
Does it work if you replace "\" with "/" in the pathname before doing the tests?

astroboy
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 30
Joined: Wed Apr 09, 2008 8:05 pm

Post by astroboy » Sun Nov 02, 2008 4:23 pm

Umh, I found the source of the problem.

It turns out that the stacks were legacy revolution stacks. I was able to open them via "go to card x in stack y" in the IDE because in the IDE there are support for old formats, but not in the engine attached to the standalones.

All I had to do was to put "Save as" the stacks with another name, delete the old stacks and rename the new ones to the original stack name. That did it.

Thanks for your shot SparkOut!

Best Regards,

Alex

Post Reply

Return to “Windows”