An interface to carry around arrays of nsIProperty instances Note that implementations of the interface should also provide nsIMutableArray. QI to nsIMutableArray to access add/remove/clear methods. More...
import"sbIPropertyArray.idl";
Public Member Functions | |
void | appendProperty (in AString aID, in AString aValue) |
void | appendProperties (in sbIPropertyArray aPropertyArray, in boolean aSkipDuplicates) |
Public Member Functions inherited from sbIPropertyArray | |
sbIProperty | getPropertyAt (in unsigned long aIndex) |
AString | getPropertyValue (in AString aID) |
AString | toString () |
Public Attributes | |
attribute boolean | strict |
Public Attributes inherited from sbIPropertyArray | |
readonly attribute boolean | validated |
An interface to carry around arrays of nsIProperty instances Note that implementations of the interface should also provide nsIMutableArray. QI to nsIMutableArray to access add/remove/clear methods.
Definition at line 93 of file sbIPropertyArray.idl.
void sbIMutablePropertyArray::appendProperties | ( | in sbIPropertyArray | aPropertyArray, |
in boolean | aSkipDuplicates | ||
) |
Adds the properties specified by aPropertyArray to the array. If aSkipDuplicates is true, don't add properties that are already present.
aPropertyArray | Array of properties to add. |
aSkipDuplicates | If true, skip duplicate properties. |
void sbIMutablePropertyArray::appendProperty | ( | in AString | aID, |
in AString | aValue | ||
) |
Adds a new property to the array
aName | The id of the property |
aValue | The value of the property |
NS_ERROR_ILLEGAL_VALUE | if the 'strict' attribute is true and aValue fails the 'validate' method of the sbIPropertyInfo represented by aName fails. |
attribute boolean sbIMutablePropertyArray::strict |
Determines whether or not the appendProperty method will throw on invalid input (i.e. setting a value on a property whose sbIPropertyInfo 'validate' method fails on that input). Defaults to true.
An example of improper usage is setting non-numeric text in a property whose parent sbIPropertyInfo is actually sbINumberPropertyInfo.
Note that this property can only be set if the implementing array is empty. Any attempt to set this property after 'appendProperty' has been called will throw NS_ERROR_FAILURE.
Definition at line 130 of file sbIPropertyArray.idl.