Open a stack in the same folder
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Open a stack in the same folder
Hi,
I can not get a stack in the same folder as my standalone to open. I get "Can't find file 'Spolin Workshop.livecode'." Any ideas?
Here is the script in my standalone:
on Openstack
put the effective filename of this stack into tPath
set itemdelimiter to "/"
delete last item of tPath
put "/" & "Spolin Workshop.livecode" after tpath
if there is a stack tpath
then
open stack tpath
else
answer "Can't find file 'Spolin Workshop.livecode'."
end if
end Openstack
I can not get a stack in the same folder as my standalone to open. I get "Can't find file 'Spolin Workshop.livecode'." Any ideas?
Here is the script in my standalone:
on Openstack
put the effective filename of this stack into tPath
set itemdelimiter to "/"
delete last item of tPath
put "/" & "Spolin Workshop.livecode" after tpath
if there is a stack tpath
then
open stack tpath
else
answer "Can't find file 'Spolin Workshop.livecode'."
end if
end Openstack
-
- VIP Livecode Opensource Backer
- Posts: 9656
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Open a stack in the same folder
Hi.
When you built your standalone, did you add the errant stack file in the "stacks" panel of the "Standalone Application Settings"?
Craig
When you built your standalone, did you add the errant stack file in the "stacks" panel of the "Standalone Application Settings"?
Craig
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Open a stack in the same folder
Hi maxs,
Which platform do you use ?
I remember effective filename for OS X is diffferent than filepath for windows.
Best regards
Jean-Marc
Which platform do you use ?
I remember effective filename for OS X is diffferent than filepath for windows.
Best regards
Jean-Marc
https://alternatic.ch
Re: Open a stack in the same folder
Hi Maxs,
add your stack(s and other files and folders) via the "Copy files" tab in the "Standalone Application Settings"!
The you will find it here -> specialfolderpath("resources") on ANY platform.
That specialfolderpath does also work in the IDE, it points to the folder the current stack is in!
Best
Klaus
add your stack(s and other files and folders) via the "Copy files" tab in the "Standalone Application Settings"!
The you will find it here -> specialfolderpath("resources") on ANY platform.
That specialfolderpath does also work in the IDE, it points to the folder the current stack is in!
Best
Klaus
Re: Open a stack in the same folder
Hi Klaus,
Thanks for replying.
I added my stack via the "Copy files" tab in the "Standalone Application Settings"! (But the stack would not allow me to make changes.)
I also added my stack under "Stack files in the application.
Both ways opened the stack, but all text added to fields was erased, and all changed were gone when I reopened the stack. I made the stack outside the standalone so I could save my changes. But that is not working.
I do not understand what this means, but I just need help saving my changes:
The you will find it here -> specialfolderpath("resources") on ANY platform.
That specialfolderpath does also work in the IDE, it points to the folder the current stack is in!
Any ideas? Max
Thanks for replying.
I added my stack via the "Copy files" tab in the "Standalone Application Settings"! (But the stack would not allow me to make changes.)
I also added my stack under "Stack files in the application.
Both ways opened the stack, but all text added to fields was erased, and all changed were gone when I reopened the stack. I made the stack outside the standalone so I could save my changes. But that is not working.
I do not understand what this means, but I just need help saving my changes:
The you will find it here -> specialfolderpath("resources") on ANY platform.
That specialfolderpath does also work in the IDE, it points to the folder the current stack is in!
Any ideas? Max
Re: Open a stack in the same folder
Hi Max,
unless the user of your standalone has ADMIN privileges and the runtime has been installed
into the OS Application/Programm Files folder then we do not have write permissions there!
And saving a stack is considered writing in that folder.
So if you want to save the separate stacks then you need to copy them to the users preferences or
documents folder first just like on mobile.
Best
Klaus
unless the user of your standalone has ADMIN privileges and the runtime has been installed
into the OS Application/Programm Files folder then we do not have write permissions there!
And saving a stack is considered writing in that folder.
So if you want to save the separate stacks then you need to copy them to the users preferences or
documents folder first just like on mobile.
Best
Klaus
Re: Open a stack in the same folder
Hi Klaus,
What a dunderhead I am. I forgot to tell you this is for a Mac. I know I should be able to save changes on a stack outside of a standalone. I did add "Save this stack" to a closestack, but the changes would not appear when I reopened.
Thanks for your help. I know Im missing something.
My best Max
What a dunderhead I am. I forgot to tell you this is for a Mac. I know I should be able to save changes on a stack outside of a standalone. I did add "Save this stack" to a closestack, but the changes would not appear when I reopened.
Thanks for your help. I know Im missing something.
My best Max
Re: Open a stack in the same folder
I may have an idea
When I added my stack via the "Copy files" tab , I believe it may have created an uneditable version of my stack. Perhaps I need to find a way to reference the pathname to the stack that is in the same location as the standalone, and then have it open that stack. Yes? If so, how?
Max
When I added my stack via the "Copy files" tab , I believe it may have created an uneditable version of my stack. Perhaps I need to find a way to reference the pathname to the stack that is in the same location as the standalone, and then have it open that stack. Yes? If so, how?
Max
Re: Open a stack in the same folder
Hi Klaus,
I got it working. After a lot of fiddling. But your help was essential. Thank you for helping me through this important issue. Max
I got it working. After a lot of fiddling. But your help was essential. Thank you for helping me through this important issue. Max