Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
robm80
- Posts: 161
- Joined: Sat May 03, 2014 7:15 am
Post
by robm80 » Thu Aug 14, 2014 11:46 am
Mystery:
I made a name-address-place file: nothing wrong: after "save" the textfiles show their texts as it should be.
I made a standalone: now the textfiles loose their text after a "save" and a restart.

-
Klaus
- Posts: 14199
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Thu Aug 14, 2014 12:41 pm
Hi Rob,
@#$#%^&*: Livecode
come on, we both know that in the end it will not be Livecode's fault, so instead of blaming Livecode you should start
to give better descriptions of your problems! Or any description at all
1. What is a "name-address-place file"?
2. Where do you put this in the standalone?
3. What did you script to "save" whatever you need to save?
4. Where do you "save" that "name-address-place file"?
Hint: Standalones cannot save themselves, but I am sure you know that already.
Best
Klaus
-
dunbarx
- VIP Livecode Opensource Backer

- Posts: 10333
- Joined: Wed May 06, 2009 2:28 pm
Post
by dunbarx » Thu Aug 14, 2014 1:43 pm
Rob.
When you say "textFiles", do you mean fields within the stack? Or external text files? Please explain.
If fields within the stack, I think that Klaus was optimistic. Did you create your standalone with a "splash" stack, which would be the executable, and the "main" stack as an attached file? This is a classic problem if you did not.
Craig Newman
-
robm80
- Posts: 161
- Joined: Sat May 03, 2014 7:15 am
Post
by robm80 » Thu Aug 14, 2014 8:52 pm
1. What is a "name-address-place file"?
2. Where do you put this in the standalone?
3. What did you script to "save" whatever you need to save?
4. Where do you "save" that "name-address-place file"?
5. Hint: Standalones cannot save themselves, but I am sure you know that already.
Ad 5: No I did not know, but now I do. I tried in every exe I made, to save a new card, but after restart that card was gone.
If there is no way to save a standalone, than Livecode is useless to me. The only way then to use it , is not making a standalone
and to be content with the *.livecode.
Ad 1. A livecode-file with for friend and relations to keep name, address and city, and so on, on different cards.
Ad 2. Don't understand, I just make a standalone.
Ad 3. "save this stack"
Ad 4.Don't understand: f.i. "d:\Livecode\exe's\NAW.exe", if that is what you want to know.
Hope you have a positive answer.
Rob
-
FourthWorld
- VIP Livecode Opensource Backer

- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
-
Contact:
Post
by FourthWorld » Thu Aug 14, 2014 9:09 pm
See the note in bold on page 299 of the User Guide (accessible through the Help menu):
Note: A stack file directly attached to a standalone application cannot have changes saved to it. This stack is bound directly to the executable file that runs. The OS locks an executable file while it is running. If you want to save changes in your standalone application, split your stack up until multiple files. A common technique is to create a "splash screen" stack that contains a welcome screen and then loads the stacks that make up the rest of your application. These stacks are referenced as stackFiles on this pane in the standalone settings screen. It is thus possible to automatically update these component stacks, or to save changes to them. You may also want to consider creating preference files in the appropriate location on your end user's system (see the specialFolderPath function and query/setRegistry functions for more information).
This may also help:
http://livecodejournal.com/tutorials/sa ... ution.html
-
Simon
- VIP Livecode Opensource Backer

- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
Post
by Simon » Thu Aug 14, 2014 9:45 pm
Hi Rob,
Check out the little stack here;
http://forums.livecode.com/viewtopic.ph ... 68#p103136
It will show you how to save an external text file with all the info you need.
Using an external stack file is the most versitile but using a text file to save info is easy to understand.
Just select a couple of images and write some sort of description for them then look in your Documents\myPlants folder for Preference.txt. Take a look at that file.
There is a lot of code in that stack that is only ever used once... but it has to be.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
robm80
- Posts: 161
- Joined: Sat May 03, 2014 7:15 am
Post
by robm80 » Thu Aug 14, 2014 9:56 pm
1. When you say "textFiles", do you mean fields within the stack? Or external text files? Please explain.
If fields within the stack, I think that Klaus was optimistic.
2. Did you create your standalone with a "splash" stack, which would be the executable, and the "main" stack as an attached file? This is a classic problem if you did not.
ad 1. Yes I mean fields within the stack.
ad 2. I have no idea about what you are talking with "splash stack" and "main" stack as an attached file?" No I did not and I have to be explained how to do that.
Rob
-
dunbarx
- VIP Livecode Opensource Backer

- Posts: 10333
- Joined: Wed May 06, 2009 2:28 pm
Post
by dunbarx » Thu Aug 14, 2014 10:28 pm
So we now know that you need to learn about attaching files to your standalone. Good. I got caught the same way when I was learning about all this. No OS will allow the executable to save itself, that is why the "Welcome" or "Splash" stack is attached to the executable, and all other stacks ride along. Oftentimes. this stack has no content at all. It just forms a vehicle required to create the standalone. In fact, you can hide the executable so it is never even seen.
But all those other stacks can indeed be saved.
As Sefro says, you can use a DB. But unless you have many, many cards, I think you can stick with a stack.
Craig
-
robm80
- Posts: 161
- Joined: Sat May 03, 2014 7:15 am
Post
by robm80 » Thu Aug 14, 2014 11:05 pm
If I understand correctly, you're saving each persons information on a separate card. You may be better off using one card and an SQLlite db. This lesson gives a pretty good example of what you'd need to do:
I am on my way, but this is new stuff for me!
that is why the "Welcome" or "Splash" stack is attached to the executable, and all other stacks ride along. Oftentimes. this stack has no content at all. It just forms a vehicle required to create the standalone
PLease tell me how to do: the userguide is not very explicit in it.
Rob
-
robm80
- Posts: 161
- Joined: Sat May 03, 2014 7:15 am
Post
by robm80 » Thu Aug 14, 2014 11:09 pm
PS:
you can use a DB. But unless you have many, many cards, I think you can stick with a stack.
I have 188 cards,; a stack will do?
Rob
-
robm80
- Posts: 161
- Joined: Sat May 03, 2014 7:15 am
Post
by robm80 » Fri Aug 15, 2014 5:29 am
Well, I made a stack "welcome" . I added as stackfile: "d:\Livecode\livecode's\NAW.livecode"
The stackscript I found in the standalone-lesson:
Code: Select all
on startup
hide this stack
close this stack
go to stack NAW of this stack
end startup
After making a standalone, nothing happens: I expected at least the " go to stack NAW of this stack".
So, what do I have to learn and what's wrong?
I am a stranger in Paradise
Rob
-
robm80
- Posts: 161
- Joined: Sat May 03, 2014 7:15 am
Post
by robm80 » Fri Aug 15, 2014 10:07 am
Finally good news:
I found it, thanks to you all and the booklet. 
-
dunbarx
- VIP Livecode Opensource Backer

- Posts: 10333
- Joined: Wed May 06, 2009 2:28 pm
Post
by dunbarx » Sat Aug 16, 2014 2:26 am
Great.
188 cards is nothing for LC.
20,000 would be. The usable limit in a modern machine is a handful of thousand or so. It is one thing HC did better; it cared not about that sort of thing, within reason.
Craig