Feature #780
Plugins: Make it possible to modify a setting object programatically
| Status: | Accepted | Start date: | 11/16/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% | ||
| Category: | plugins | |||
| Target version: | Long term |
Description
When i try to change a setting in real time it changes and when i'm inside showtime it works (but is not changed in the settings), but when i quit showtime the setting is back to default...
service.set=1;
History
#1
Updated by Andreas Öman over 1 year ago
- Status changed from New to Need feedback
I'm not even sure what you are trying to do here.
What is the service object?
#2
Updated by andreus sebes over 1 year ago
This a plugin setting i tried to change inside the plugin
settings.createBool("set", "Accepted?", false, function(v) { service.set= v; });
then if the user acceptd it i want to change it permanently (even if you quit showtime)
@if (service.set!='1')
{
if (showtime.message("text?", true, true)) service.set= 1;
else
{
page.error("Error.");
return;
}
}@
#3
Updated by Andreas Öman over 1 year ago
- Tracker changed from Bug to Feature
- Subject changed from Plugins: Save a setting in real time to Plugins: Make it possible to modify a setting object programatically
- Status changed from Need feedback to Accepted
- Target version changed from 3.4 to Long term
Your code is wrong.
service.set is in no way related to the setting object.
the anonymous function that is passed to the createBool() function modifies service.set but there
is nothing that makes it work the opposite way.
I think I understand what you're trying to do but unfortunately there is no way to programatically modify settings from javascript.
It could be useful though, so i'm changing this into a feature request.
#4
Updated by andreus sebes over 1 year ago
Ok .Thanks andreas