Hola Alfredo,
this is correct behaviour!
Standalones never save themselves, so you need to take care of this.
Do this:
1. When your app starts you need to check if you already wrote the content of your field to a file before.
2. If yes, read that file and put its content back into that field.
3. When the stack closes, write the content of your field to that file.
You can use specialfolderpath("documents") where your app has write permission:
Code: Select all
on preopenstack
## do your preopenstack stuff here...
## "Build" the absolute path to your file:
put specialfolderpath("documents") & "/" & "your filename here.txt") into myPrefs
## Don't try to access a non-existing file! ;-)
if there is a file myPrefs then
put url("file:" & myPrefs) into fld "your top players fieldname here" of cd 1 ## or whereever that field lives
end if
end preopenstack
## Write fields content to file:
on closestack
put specialfolderpath("documents") & "/" & "your filename here.txt") into myPrefs
put ld "your top players fieldname here" of cd 1 into url("file:" & myPrefs)
end closestack
Of course you can use another name for the file
Best from germany
Klaus