New settings format doesn't work
#1
Hi, according to this site in the wiki I wanted to convert my addon's settings to the new format. This is what I got so far:
xml:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings version="1">
    <section id="script.module.example">
        <category id="general" label="General" help="">
            <group id="0" label="32561">
                <setting id="provider" type="integer" label="32561" help="32562">
                    <level>0</level>
                    <default>0</default>
                    <constraints>
                        <options>
                            <option label="32570">0</option>
                            <option label="32571">1</option>
                        </options>
                    </constraints>
                    <control type="spinner" format="string"/>
                </setting>
            </group>
            <group id="1" label="32563">
                <setting id="username" type="string" label="32564" help="32565">
                    <level>0</level>
                    <default/>
                    <control type="edit" format="string">
                        <heading>32564</heading>
                    </control>
                </setting>
                <setting id="password" type="string" label="32566" help="32567">
                    <level>0</level>
                    <default/>
                    <control type="edit" format="string">
                        <heading>32566</heading>
                        <hidden>true</hidden>
                    </control>
                </setting>
            </group>
        </category>
    </section>
</settings>

The first setting (the spinner) works just fine and is shown in the settings dialog as expected. However, the settings for username and password, where you have to enter a string, are not shown in the settings dialog at all. I've already tried putting them in the first group as well, but this didn't work either. So could you please help me, what the problem is?
Reply
#2
You don't have a default value for the settings and you are also not allowing an empty setting value.

Try adding the following to the setting definition, as shown in the example that you linked to in the Wiki
Code:
<constraints>
    <allowempty>true</allowempty>
</constraints>
Reply

Logout Mark Read Team Forum Stats Members Help
New settings format doesn't work0