I thought about mentioning that, but kresten's statement makes me think they won't believe it if Lc is installed. A vm is a simple solution to that problem, as well as giving the ability to test multiple platforms without much difficulty.jacque wrote:Just build the standalone and run it. A standalone is an independent app that LC won't see. The way it works on your computer is how it will work on anyone's computer (on the same OS).kresten wrote:So nice, but how can I test reliably on my own computer with its installed LC ?
Repairing the amnesia of standalones
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Repairing the amnesia of standalones
Re: Repairing the amnesia of standalones
Thank you for instructions, i followed the sugested scripting, and performed the standaloning of the launcher, placed in the same folder as the mainstack, but - alas - it doesn't open the mainstack. Can there be specifications of the standaloning setup necessary to make the launcher do its job ? I am working in LC v 6.7.8.
-
- VIP Livecode Opensource Backer
- Posts: 9960
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Repairing the amnesia of standalones
Standalones can open stack files just as the IDE does; they both use the same scripting language.kresten wrote:Thank you for instructions, i followed the sugested scripting, and performed the standaloning of the launcher, placed in the same folder as the mainstack, but - alas - it doesn't open the mainstack. Can there be specifications of the standaloning setup necessary to make the launcher do its job ? I am working in LC v 6.7.8.
What does the code you're using for that look like?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Repairing the amnesia of standalones
I dont understand your question. Does it refer to the short script in the launcher stack ?
-
- VIP Livecode Opensource Backer
- Posts: 9960
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Repairing the amnesia of standalones
The code we'd need to see is the code that isn't working.kresten wrote:I dont understand your question. Does it refer to the short script in the launcher stack ?
It seems the issue at hand is that the standalone isn't able to open a stack file. If that's correct, the code that determines the path to the stack file and then attempts to open it is what we'd need to see.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Repairing the amnesia of standalones
Well, I have been trying this, but it doesn't open the stack, neither when placed into the Diaryproper folder nor in the folder above that.
on openStack
open stack "/Diaryproper/e-diary.livecode"
hide this stack
end openStack
on openStack
open stack "/Diaryproper/e-diary.livecode"
hide this stack
end openStack
Re: Repairing the amnesia of standalones
Is the launcher in the same folder as the stack it is launching? If it is, you could use relative path expression to open the stack, such as this -
Try that first (putting the two in the same folder if they are not currently), and let us know how it works out. Others may have other suggestions as well.
Just as an example of how it should work, this is a simple demo of a timer with a launcher (it was an early prototype, so hold back on the laughter ) Only turn the launcher (clearly labeled) into the standalone and save it back to the demo folder.
Code: Select all
on openStack
open stack "e-diary.livecode"
hide this stack
end openStack
Just as an example of how it should work, this is a simple demo of a timer with a launcher (it was an early prototype, so hold back on the laughter ) Only turn the launcher (clearly labeled) into the standalone and save it back to the demo folder.
Re: Repairing the amnesia of standalones
I tried as you suggested, with no avail.
I observe, that the standalone Launcher doesn't close itself.
Could the mere size of my mainstack (2,2 Mb) be a problem ?
The size of the standalone Launcher becomes 4,7 Mb.
I observe, that the standalone Launcher doesn't close itself.
Could the mere size of my mainstack (2,2 Mb) be a problem ?
The size of the standalone Launcher becomes 4,7 Mb.
Re: Repairing the amnesia of standalones
The demo I uploaded failed to work? I think I'd have to ask at this point if you are developing on a mac, since I've thoroughly tested and had other people test this stack on windows and linux. The only thing I can think at this point is that your on a mac possibly, which has different rules for the app folder.
Re: Repairing the amnesia of standalones
No Your demo works fine
Re: Repairing the amnesia of standalones
The size of the standalone isn't a problem, and it's actually a fairly small size as standalones go.
The most likely cause of the failure is a bad file path, which is why it would help for us to see the part of the script that tries to open the file.
The most likely cause of the failure is a bad file path, which is why it would help for us to see the part of the script that tries to open the file.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9960
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Repairing the amnesia of standalones
All file I/O is best accompanied by error-checking, given the range of things that can go wrong (paths, permissions, etc.). Try this and report back what you get - I suspect Jacque's right, that it's the path that needs adjusting:on openStackkresten wrote:Well, I have been trying this, but it doesn't open the stack, neither when placed into the Diaryproper folder nor in the folder above that.
on openStack
open stack "/Diaryproper/e-diary.livecode"
hide this stack
end openStack
Code: Select all
on openrStack
open stack "/Diaryproper/e-diary.livecode"
if the result is not empty rhen
answer the result &&"(" & sysError() &")"
exit to top
end if
hide this stack
end openStack
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Repairing the amnesia of standalones
For some reason I missed the reported handler, sorry. When a standalone launches, the defaultfolder is the folder containing the app (on a Mac, that's inside the app bundle.) The path in the handler points to a folder inside the the app's folder which probably isn't where the file is.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Repairing the amnesia of standalones
I followed Richards scripting and got the answer : No such card(2)
I am afraid I dont understand Jaques advice and its reference to app and bundle. My mainstack and its folders are placed on my desktop. will I have to go elsewhere ?
I am afraid I dont understand Jaques advice and its reference to app and bundle. My mainstack and its folders are placed on my desktop. will I have to go elsewhere ?
Re: Repairing the amnesia of standalones
kresten, first we really need to know what Operating system your working with, paths vary from os to os. From the reported error (No such card(2)), it sounds like the program is unable to find the stack your telling it to launch or you have code in the program referring to a card that doesn't exist, which is causing it to fail.
You said my demo program worked fine, so this technique *does* work, at this point it is just a matter of tracking down where your version is amiss.
Feel free to zip up your stacks and post them, which is the easiest way to track down the issue.
You said my demo program worked fine, so this technique *does* work, at this point it is just a matter of tracking down where your version is amiss.
Feel free to zip up your stacks and post them, which is the easiest way to track down the issue.