Re: Question about states.
Posted: Sat Aug 17, 2013 8:21 am
Try this:
From that you should be able to figure out if something else in the splash stack is causing problems.
Simon
Code: Select all
on openCard
put "thisDestination" into tDestination
put "thisValue" into tValue
put specialFolderPath("documents") & "/MyPrefs.lc" into tPrefsFile
if there is no stack tPrefsFile then
savePref tDestination,tValue
else
go invisible stack tPrefsFile
answer the thisDestination of stack "myPrefs"
delete stack "myPrefs"
end if
end openCard
on savePref pPref,pValue
put specialFolderPath("documents") & "/MyPrefs.lc" into tPrefsFile
create invisible stack "myPrefs"
set the filename of it to tPrefsFile
save stack "myPrefs"
set the pPref of stack "myPrefs" to pValue
end savePrefSimon