Add this line right after save... and tell us what you will read, if at all:
Code: Select all
...
save this stack
answer the result
...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
...
save this stack
answer the result
...
Code: Select all
save stack "<stackname>"
the result is blank:Klaus wrote: ↑Sun Dec 19, 2021 2:25 pmHm, not really...
Add this line right after save... and tell us what you will read, if at all:Code: Select all
... save this stack answer the result ...
I'm having some trouble with "this stack" too in some cases. Try using the actual stack name instead of "this stack".
ALWAYS be explicit, and this applies elsewhere, as, for example in referring to controls. That way it does not matter where you are when you want to do something.Try using the actual stack name instead of "this stack".
Code: Select all
function isBuildingStandalone
return (the environment is "development" AND there is a stack "revStandaloneProgress" AND the mode of stack "revStandaloneProgress" > 0)
end isBuildingStandalone
on openstack
if isBuildingStandalone() then
exit openstack
end if
## Neccessary so all opened stacks can access the inclusions of stack "SPLASH"!
start using this stack
## Prepare filenames:
## Stack in RESOURCES
put specialfolderpath("resources") & "/clickMe.livecode" into tSourceStack
## Stack in DOCUMENTS folder
put specialfolderpath("documents") & "/clickMe.livecode" into tTargetStack
## check if we already opened the app = the WORKING stack is already in DOCS folder
if NOT (there is a stack tTargetStack) then
## Now copy the stack to the DOCS folder
put url("binfile:" & tSourceStack) into url("binfile:" & tTargetStack)
end if
## NOW we can open that "new" stack that NOW can be saved
go stack tTargetStack
hide stack "SplashSource"
end openstack
Well, that was the goal of this 5 pages long thread, wasn't it?... and it's creating me a problem on the PC because when it goes to the "working stack" it saves me a copy of the stack in the documents folder of my PC...
This is definitively NOT LCs problem!... so sometimes i make changes on that and sometimes i make changes on the original and that creates a problem because then i have 2 stacks of the same project but none of them is entirely upgraded...
Code: Select all
on openstack
if isBuildingStandalone() then
exit openstack
end if
## Neccessary so all opened stacks can access the inclusions of stack "SPLASH"!
start using this stack
## Prepare filenames:
## Stack in RESOURCES
put specialfolderpath("resources") & "/clickMe.livecode" into tSourceStack
## Only copy in the runtime and NOT while in the IDE:
if the environment = "development" then
go stack tTargetStack
hide stack "SplashSource"
exit openstack
end if
## This will now only be executed in a runtime!
## Stack in DOCUMENTS folder
put specialfolderpath("documents") & "/clickMe.livecode" into tTargetStack
## check if we already opened the app = the WORKING stack is already in DOCS folder
if NOT (there is a stack tTargetStack) then
## Now copy the stack to the DOCS folder
put url("binfile:" & tSourceStack) into url("binfile:" & tTargetStack)
end if
## NOW we can open that "new" stack that NOW can be saved
go stack tTargetStack
hide stack "SplashSource"
end openstack