Show / Hide Table of Contents

Class NSPreference

One preference item, which contains a specification (section/key), the raw string value, and the level at which this value was found.

Syntax

Constructors

NSPreference()

Initializes a new instance of the NSPreference class.

Introduced or updated in version: 7

Declaration
NSPreference

Methods

GetDisplayTooltip()

Introduced or updated in version: 7

Declaration
String GetDisplayTooltip()
Returns
Type Description
String

Display tooltip, populated when asked for. Formatted using CultureDataFormatter.

Remarks

Suitable for binding display-datasource in lists, etc.

Examples
NSPreference thing;
String displayTooltip = thing.GetDisplayTooltip();

GetDisplayType()

Introduced or updated in version: 7

Declaration
Integer GetDisplayType()
Returns
Type Description
Integer

Display type, populated when asked for. See PrefDescValueType.

Examples
NSPreference thing;
Integer displayType = thing.GetDisplayType();

GetDisplayValue()

Introduced or updated in version: 7

Declaration
String GetDisplayValue()
Returns
Type Description
String

Display value, populated when asked for. Formatted using CultureDataFormatter.

Remarks

Suitable for binding display-datasource in lists, etc.

Examples
NSPreference thing;
String displayValue = thing.GetDisplayValue();

GetLevel()

Introduced or updated in version: 7

Declaration
Integer GetLevel()
Returns
Type Description
Integer

See PreferenceLevel. Undefined is returned for preferences that do not have a current setting.

Examples
NSPreference thing;
Integer level = thing.GetLevel();

GetPrefDescId()

Introduced or updated in version: 7.5

Declaration
Integer GetPrefDescId()
Returns
Type Description
Integer

The ID of the prefdesc this preference is connected to.

Examples
NSPreference thing;
Integer prefDescId = thing.GetPrefDescId();

GetRawValue()

Introduced or updated in version: 7

Declaration
String GetRawValue()
Returns
Type Description
String

NSPreference value.

Examples
NSPreference thing;
String rawValue = thing.GetRawValue();

GetSpecification()

Introduced or updated in version: 7

Declaration
NSPreferenceSpec GetSpecification()
Returns
Type Description
NSPreferenceSpec

Preference specification, consisting of the section name and key name.

Examples
NSPreference thing;
NSPreferenceSpec specification = thing.GetSpecification();

GetTableName()

Introduced or updated in version: 7.5

Declaration
String GetTableName()
Returns
Type Description
String

For DisplayType=PrefDescValueType.ListTableRef, TableName will contain the name of the table which the value reference to.

Examples
NSPreference thing;
String tableName = thing.GetTableName();

GetTabOrder()

Introduced or updated in version: 7

Declaration
NSTabOrder GetTabOrder()
Returns
Type Description
NSTabOrder
Examples
NSPreference thing;
NSTabOrder tabOrder = thing.GetTabOrder();

GetTargetId()

Introduced or updated in version: 7.5

Declaration
Integer GetTargetId()
Returns
Type Description
Integer

The ID of the target row. The table it points at is specified by the preference type.

Examples
NSPreference thing;
Integer targetId = thing.GetTargetId();

GetUserPreferenceId()

Introduced or updated in version: 7.5

Declaration
Integer GetUserPreferenceId()
Returns
Type Description
Integer

The ID of the user preference.

Examples
NSPreference thing;
Integer userPreferenceId = thing.GetUserPreferenceId();

SetDisplayTooltip(String)

Introduced or updated in version: 7

Declaration
Void SetDisplayTooltip(String displayTooltip)
Parameters
Type Name Description
String displayTooltip

Display tooltip, populated when asked for. Formatted using CultureDataFormatter.

Returns
Type Description
Void
Remarks

Suitable for binding display-datasource in lists, etc.

Examples
NSPreference thing;
String displayTooltip;
thing.SetDisplayTooltip(displayTooltip);

SetDisplayType(Integer)

Introduced or updated in version: 7

Declaration
Void SetDisplayType(Integer displayType)
Parameters
Type Name Description
Integer displayType

Display type, populated when asked for. See PrefDescValueType.

Returns
Type Description
Void
Examples
NSPreference thing;
Integer displayType;
thing.SetDisplayType(displayType);

SetDisplayValue(String)

Introduced or updated in version: 7

Declaration
Void SetDisplayValue(String displayValue)
Parameters
Type Name Description
String displayValue

Display value, populated when asked for. Formatted using CultureDataFormatter.

Returns
Type Description
Void
Remarks

Suitable for binding display-datasource in lists, etc.

Examples
NSPreference thing;
String displayValue;
thing.SetDisplayValue(displayValue);

SetLevel(Integer)

Introduced or updated in version: 7

Declaration
Void SetLevel(Integer level)
Parameters
Type Name Description
Integer level

Preference level. See PreferenceLevel.

Returns
Type Description
Void
Remarks

Undefined is returned for preferences that do not have a current setting.

Examples
NSPreference thing;
Integer level;
thing.SetLevel(level);

SetPrefDescId(Integer)

Introduced or updated in version: 7.5

Declaration
Void SetPrefDescId(Integer prefDescId)
Parameters
Type Name Description
Integer prefDescId

The ID of the prefdesc this preference is connected to.

Returns
Type Description
Void
Examples
NSPreference thing;
Integer prefDescId;
thing.SetPrefDescId(prefDescId);

SetRawValue(String)

Introduced or updated in version: 7

Declaration
Void SetRawValue(String rawValue)
Parameters
Type Name Description
String rawValue

Preference value.

Returns
Type Description
Void
Examples
NSPreference thing;
String rawValue;
thing.SetRawValue(rawValue);

SetSpecification(NSPreferenceSpec)

Introduced or updated in version: 7

Declaration
Void SetSpecification(NSPreferenceSpec specification)
Parameters
Type Name Description
NSPreferenceSpec specification

Preference specification, consisting of the section name and key name.

Returns
Type Description
Void
Examples
NSPreference thing;
NSPreferenceSpec specification;
thing.SetSpecification(specification);

SetTableName(String)

Introduced or updated in version: 7.5

Declaration
Void SetTableName(String tableName)
Parameters
Type Name Description
String tableName

For DisplayType=PrefDescValueType.ListTableRef, TableName will contain the name of the table which the value reference to.

Returns
Type Description
Void
Examples
NSPreference thing;
String tableName;
thing.SetTableName(tableName);

SetTabOrder(NSTabOrder)

Introduced or updated in version: 7

Declaration
Void SetTabOrder(NSTabOrder tabOrder)
Parameters
Type Name Description
NSTabOrder tabOrder
Returns
Type Description
Void
Examples
NSPreference thing;
NSTabOrder tabOrder;
thing.SetTabOrder(tabOrder);

SetTargetId(Integer)

Introduced or updated in version: 7.5

Declaration
Void SetTargetId(Integer targetId)
Parameters
Type Name Description
Integer targetId

The ID of the target row. The table it points at is specified by the preference type.

Returns
Type Description
Void
Examples
NSPreference thing;
Integer targetId;
thing.SetTargetId(targetId);

SetUserPreferenceId(Integer)

Introduced or updated in version: 7.5

Declaration
Void SetUserPreferenceId(Integer userPreferenceId)
Parameters
Type Name Description
Integer userPreferenceId

The ID of the user preference.

Returns
Type Description
Void
Examples
NSPreference thing;
Integer userPreferenceId;
thing.SetUserPreferenceId(userPreferenceId);
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top