Opening a Stack outside a standalone
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Opening a Stack outside a standalone
How can I get a standalone to open a stack outside of the standalone?
Max
Max
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Opening a Stack outside a standalone
I don't think you can as that would open a path for anyone to rip-off the Livecode Engine
and use it as re-engineered front-end for editing stacks.
Of course your standalone can contain substacks . . .
and use it as re-engineered front-end for editing stacks.
Of course your standalone can contain substacks . . .
Re: Opening a Stack outside a standalone
Exactly as in the IDE, that is:
This works as usual on all platforms that has also an IDE version,
Mac/Windows/Linux/RaspberryPi desktop.
Just save a stack with one button as standalone to test this,
for example:
Edit. (Also removed typo.) Of course you can't edit scripts with the standalone.
This works as usual on all platforms that has also an IDE version,
Mac/Windows/Linux/RaspberryPi desktop.
Just save a stack with one button as standalone to test this,
for example:
Code: Select all
on mouseUp
answer file "Choose stack to open"
set itemdel to "."
if last item of it is "livecode"
then open stack it
end mouseUp
Last edited by [-hh] on Mon Jul 04, 2016 8:45 pm, edited 2 times in total.
shiftLock happens
Re: Opening a Stack outside a standalone
I just need a stack outside the engine so I can write into fields and not have it erase when the standalone closes.
Re: Opening a Stack outside a standalone
Why don't you try?
Close to everything works in LiveCode. Also creating and saving a stack by a standalone.
Example:
--button "SAVE"
--button "CREATE"
--button "OPEN"
Close to everything works in LiveCode. Also creating and saving a stack by a standalone.
Example:
--button "SAVE"
Code: Select all
on mouseUp
ask file "Save stack TEST as ..."
if it is empty then exit mouseUp
save stack "TEST" as it
end mouseUp
Code: Select all
on mouseUp
if there is no stack "TEST" then create stack "TEST"
go stack "TEST"
if there is no field "TEST" then create fld "TEST"
put the internet date into fld "TEST"
end mouseUp
Code: Select all
on mouseUp
answer file "Open stack TEST"
if it is empty then exit mouseUp
set itemdel to "."
if last item of it is "livecode"
then open stack it
end mouseUp
Last edited by [-hh] on Mon Jul 04, 2016 8:22 pm, edited 1 time in total.
shiftLock happens
Re: Opening a Stack outside a standalone
Thank you HH
It really works. Thanks for the alternatives too.
I noticed that my data grids do not work in the stacks I opened with the standalone. I can no longer select lines, get data, or enter data into data grids.
Do you think this is a bug?
Max
It really works. Thanks for the alternatives too.
I noticed that my data grids do not work in the stacks I opened with the standalone. I can no longer select lines, get data, or enter data into data grids.
Do you think this is a bug?
Max
Re: Opening a Stack outside a standalone
Hi Max,
did you "INCLUDE" dataGrid in the standalone settings?
"Search for inclusions" sometimes doesn't find all needed inclusions. If it doesn't work if you include it by selecting in the settings, then please search the forums or use-list, there was a discussion recently about that (I can't remember where because I don't use dataGrid).
Hermann
p.s. You can't edit the script with a standalone but you can
set the script of created objects
and save it with the created stack, for example:
--button "SetSCRIPT"
did you "INCLUDE" dataGrid in the standalone settings?
"Search for inclusions" sometimes doesn't find all needed inclusions. If it doesn't work if you include it by selecting in the settings, then please search the forums or use-list, there was a discussion recently about that (I can't remember where because I don't use dataGrid).
Hermann
p.s. You can't edit the script with a standalone but you can
set the script of created objects
and save it with the created stack, for example:
--button "SetSCRIPT"
Code: Select all
on mouseUp
set script of stack "TEST" to \
"on openstack; answer ""e&"Hello. Here I am""e &"; end openstack"
end mouseUp
shiftLock happens
Re: Opening a Stack outside a standalone
Again thanks.
This is good advise. Max
This is good advise. Max
Re: Opening a Stack outside a standalone
Hi Max,
I would copy that stack to the users "documents" folder and that's it!
Best
Klaus
please keep in mind that the average user is not allowed to WRITE (= save a stack) in the OS application folder!maxs wrote:I just need a stack outside the engine so I can write into fields and not have it erase when the standalone closes.
I would copy that stack to the users "documents" folder and that's it!
Best
Klaus