Page 1 of 1
Plugin Settings not saving
Posted: Sat Feb 12, 2022 10:02 pm
by bob64
I can't seem to get my plugin settings to "stick"... I choose "Open plugin when LiveCode starts up" for my script-only stack. When I restart LiveCode my stack's "openScript" handler isn't activated and when I look at the plugin settings, they're back to their default settings. Any ideas...?
Re: Plugin Settings not saving
Posted: Sun Feb 13, 2022 3:08 am
by andresdt
The IDE uses the cREVLoadInfo custom property to save plugin settings.
So if your plugin is a code-only stack it is a plain text file. Any custom properties you put on your stack will be lost when you save and reopen your stack.
You can try to set the values of your plugin configuration using getProp
Code: Select all
getProp cREVLoadInfo[pKeyName]
switch pKeyName
case "load"
return true
break
end switch
end cREVLoadInfo
Look in the Property inspector for the values that each key of the cREVLoadInfo property takes.
this is just an idea

Re: Plugin Settings not saving
Posted: Mon Feb 14, 2022 3:30 am
by bob64
Thanks andresdt.
But it seems that LC knows that it's a script-only stack and doesn't even bother trying to set cREVLoadInfo... Ah well, a plain old stack does the job; just have to hide it.
Cheers,
bob64