Plugin Settings not saving

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

Post Reply
bob64
Posts: 2
Joined: Sat Feb 12, 2022 9:48 pm

Plugin Settings not saving

Post by bob64 » Sat Feb 12, 2022 10:02 pm

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...?

andresdt
Posts: 156
Joined: Fri Aug 16, 2019 7:51 pm
Contact:

Re: Plugin Settings not saving

Post by andresdt » Sun Feb 13, 2022 3:08 am

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 :idea:
Be kind, we all have our own wars.
https://torocruzand.com/

bob64
Posts: 2
Joined: Sat Feb 12, 2022 9:48 pm

Re: Plugin Settings not saving

Post by bob64 » Mon Feb 14, 2022 3:30 am

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

Post Reply