Namespace PrefsPaneObject
Object of preference variables for passing in SSB.prefs.pane.addPrefs
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Field Attributes | Field Name and Description |
|---|---|
| <static> {Object} |
PrefsPaneObject.defVal
Default Value.
|
| <static> {String} |
PrefsPaneObject.name
The name of the preference variable to be set.
|
| <static> {Object} |
PrefsPaneObject.options
Object with fields names as possible values and fileds values as text that will be
shown to user.
|
| <static> {String} |
PrefsPaneObject.title
Text that will be displayed to user.
|
| <static> {String} |
PrefsPaneObject.type
Type of the preference variable - boolean/string/options.
|
Namespace Detail
PrefsPaneObject
// defining first PrefsPaneObject
PrefsPaneObject.name = 'isNotifiactionEnabled';
PrefsPaneObject.type = 'boolean';
PrefsPaneObject.defVal = 'true';
PrefsPaneObject.title = 'Enable notification of new emails';
// defining second PrefsPaneObject (JSON way)
PrefsPaneObject_2 = {
name:'name',
type:'string',
title:'whats your name'
}
// initializing the prefsPane
SSB.prefs.pane.addPrefs([PrefsPaneObject,PrefsPaneObject_2]);
Field Detail
<static>
{Object}
PrefsPaneObject.defVal
Default Value. This value will be set only if this variable was not initialized
before, by SSB.prefs.pane.addPrefs function or by SSB.prefs.setValue.
<static>
{String}
PrefsPaneObject.name
The name of the preference variable to be set.
<static>
{Object}
PrefsPaneObject.options
Object with fields names as possible values and fileds values as text that will be
shown to user. These will be shown as drop down list to choose from.
PrefsPaneObject.name = 'myOprions'; PrefsPaneObject.type = 'options'; PrefsPaneObject.defVal = 'BMW'; PrefsPaneObject.title = 'choose your car'; PrefsPaneObject.options.MB = 'Mercedes-Benz'; PrefsPaneObject.options.BMW = 'Bavarian Motor Works'; PrefsPaneObject.options.nocar = 'I don't have a car!';
<static>
{String}
PrefsPaneObject.title
Text that will be displayed to user.
<static>
{String}
PrefsPaneObject.type
Type of the preference variable - boolean/string/options.