Ok great this clears it up. The reason for your problem is that a MW study does not 'know' what the value of a setting is until after the initialize() function has completed. During the initialize function, we are simply telling MW what the initial values are. MW does not 'set them' until the function has finished being called. This is why, if you place your debug statement in the initialize function, it will show the value of every setting to be 'null'.
If you put a debug or info statement within the initialize function that tries to output a setting value, it won't work. The study needs that function to complete/return before it will actually 'set' the settings to their initial values. If you move your debug statement to calculateValues() or calculate(), for example, you won't have this problem anymore.
You can't read setting values from within the initialize() function. That's the issue. In general, there's no reason for you to read them within the initialize function in the first place.
The initialize() function only gets called once during the lifetime of a study: when it first gets clicked, and the options menu opens up for the first time, before it is actually applied to the chart.
Try this and you'll see that the values now show up properly:
public void initialize(Defaults defaults)
{
SettingsDescriptor sd = new SettingsDescriptor();
setSettingsDescriptor(sd);
SettingTab tab = new SettingTab("General");
sd.addTab(tab);
SettingGroup inputs = new SettingGroup("Inputs");
inputs.addRow(new PercentSliderDescriptor(Inputs.INPUT, "Percentage",.10,.10));
tab.addGroup(inputs);
SettingGroup colors = new SettingGroup("Colors");
colors.addRow(new ColorDescriptor(Inputs.UP_COLOR, "Up Color", Color.blue));
colors.addRow(new ColorDescriptor(Inputs.DOWN_COLOR, "Down Color", Color.magenta));
tab.addGroup(colors);
RuntimeDescriptor rd = new RuntimeDescriptor();
setRuntimeDescriptor(rd);
rd.setLabelSettings(Inputs.INPUT);
rd.exportValue(new ValueDescriptor(test, "TPercentage", new String[] {Inputs.INPUT}));
}
@Override
protected void calculateValues(DataContext ctx) {
debug("Percentage Value " + getSettings().getDouble(Inputs.INPUT));
}