592 lines
No EOL
33 KiB
HTML
592 lines
No EOL
33 KiB
HTML
<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>YAHOO.util.Config</title>
|
|
<link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
|
|
</head>
|
|
<body>
|
|
<div class="body-wrap">
|
|
<div class="top-tools"><img src="../resources/print.gif" width="16" height="16" align="absmiddle"> <a href="YAHOO.util.Config.html" target="_blank">Print Friendly</a></div>
|
|
<h1>Class YAHOO.util.Config</h1>
|
|
<table cellspacing="0">
|
|
<tr><td class="label">Package:</td><td>YAHOO.util</td></tr>
|
|
<tr><td class="label">Class:</td><td>Config</td></tr>
|
|
<tr><td class="label">Extends:</td><td>Object</td></tr>
|
|
<tr><td class="label">Defined In:</td><td><a href="container_core.js.html">container_core.js</a></td></tr>
|
|
</table>
|
|
<div class="description">
|
|
Config is a utility used within an Object to allow the implementer to maintain a list of local configuration properties and listen for changes to those properties dynamically using CustomEvent. The initial values are also maintained so that the configuration can be reset at any given point to its initial state. </div>
|
|
<hr />
|
|
<a name="properties"></a>
|
|
<h2>Public Properties</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Property</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#owner">owner</a> : Object</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Object reference to the owner of this Config Object</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#queueInProgress">queueInProgress</a> : Boolean</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Boolean flag that specifies whether a queue is currently being executed</td>
|
|
</tr>
|
|
</table>
|
|
<a name="methods"></a>
|
|
<h2>Public Methods</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Method</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#Config">Config</a>(<code>Object owner</code>)</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc"></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#addProperty">addProperty</a>(<code>String key</code>, <code>Object propertyObject</code>) : void</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Adds a property to the Config Object's private config hash.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#alreadySubscribed<static>">alreadySubscribed<static></a>(<code>YAHOO.util.CustomEvent evt</code>, <code>Function fn</code>, <code>Object obj</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc"><static> Checks to determine if a particular function/Object pair are already subscribed to the specified Custo...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#applyConfig">applyConfig</a>(<code>Object userConfig</code>, <code>Boolean init</code>) : void</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Applies a key-value Object literal to the configuration, replacing any existing values, and queueing the property eve...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#checkBoolean">checkBoolean</a>(<code>Object val</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Validates that the value passed in is a Boolean.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#checkNumber">checkNumber</a>(<code>Object val</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Validates that the value passed in is a number.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#fireQueue">fireQueue</a>() : void</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Fires the normalized list of queued property change events</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getConfig">getConfig</a>() : Object</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns a key-value configuration map of the values currently set in the Config Object.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getProperty">getProperty</a>(<code>String key</code>) : Object</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Returns the value of specified property.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#init">init</a>(<code>Object owner</code>) : void</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Initializes the configuration Object and all of its local members.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#outputEventQueue">outputEventQueue</a>() : String</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Returns a string representation of the Config object's current CustomEvent queue</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#queueProperty">queueProperty</a>(<code>String key</code>, <code>String value</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Sets the value of a property and queues its event to execute. If the event is already scheduled to execute, it is
|
|
mov...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#refireEvent">refireEvent</a>(<code>String key</code>) : void</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Fires the event for a property using the property's current value.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#refresh">refresh</a>() : void</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Refires the events for all configuration properties using their current values.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#resetProperty">resetProperty</a>(<code>String key</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Resets the specified property's value to its initial value.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setProperty">setProperty</a>(<code>String key</code>, <code>String value</code>, <code>Boolean silent</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Sets the value of a property. If the silent property is passed as true, the property's event will not be fired.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#subscribeToConfigEvent">subscribeToConfigEvent</a>(<code>String key</code>, <code>Function handler</code>, <code>Object obj</code>, <code>Boolean override</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Subscribes an external handler to the change event for any given property.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#toString">toString</a>() : String</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns a string representation of the Config object</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#unsubscribeFromConfigEvent">unsubscribeFromConfigEvent</a>(<code>String key</code>, <code>Function handler</code>, <code>Object obj</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Unsubscribes an external handler from the change event for any given property.</td>
|
|
</tr>
|
|
</table>
|
|
<a name="events"></a>
|
|
<h2>Public Events</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Event</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#event-configChangedEvent
|
|
">configChangedEvent
|
|
</a> : ()</td>
|
|
<td class="msource" rowspan="2">Config</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Object reference to the owner of this Config Object</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2 class="mdetail-head">Property Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="owner"></a>
|
|
<div class="mdetail">
|
|
<h3>owner</i></h3>
|
|
<code>public Object owner</code>
|
|
<div class="mdetail-desc">
|
|
Object reference to the owner of this Config Object </div>
|
|
<div class="mdetail-def">This property is defined by Config.</div>
|
|
</div>
|
|
<a name="queueInProgress"></a>
|
|
<div class="mdetail alt">
|
|
<h3>queueInProgress</i></h3>
|
|
<code>public Boolean queueInProgress</code>
|
|
<div class="mdetail-desc">
|
|
Boolean flag that specifies whether a queue is currently being executed </div>
|
|
<div class="mdetail-def">This property is defined by Config.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<a name="Config"></a>
|
|
<h2 class="mdetail-head">Constructor Details</h2>
|
|
<div class="detail-wrap">
|
|
<div class="mdetail">
|
|
<h3>Config</i></h3>
|
|
<code>public function Config(<code>Object owner</code>)</code>
|
|
<div class="mdetail-desc">
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>owner</code> : Object<div class="sub-desc">The owner Object to which this Config Object belongs</div></li> </ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="mdetail-head">Method Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="addProperty"></a>
|
|
<div class="mdetail">
|
|
<h3>addProperty</i></h3>
|
|
<code>public function addProperty(<code>String key</code>, <code>Object propertyObject</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Adds a property to the Config Object's private config hash.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>key</code> : String<div class="sub-desc">The configuration property's name</div></li><li><code>propertyObject</code> : Object<div class="sub-desc">The Object containing all of this property's arguments</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="alreadySubscribed<static>"></a>
|
|
<div class="mdetail alt">
|
|
<h3>alreadySubscribed<static></i></h3>
|
|
<code>public function alreadySubscribed<static>(<code>YAHOO.util.CustomEvent evt</code>, <code>Function fn</code>, <code>Object obj</code>)</code>
|
|
<div class="mdetail-desc">
|
|
<static> Checks to determine if a particular function/Object pair are already subscribed to the specified CustomEvent
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>evt</code> : YAHOO.util.CustomEvent<div class="sub-desc">The CustomEvent for which to check the subscriptions</div></li><li><code>fn</code> : Function<div class="sub-desc">The function to look for in the subscribers list</div></li><li><code>obj</code> : Object<div class="sub-desc">The execution scope Object for the subscription</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Boolean</code><div class="sub-desc">true, if the function/Object pair is already subscribed to the CustomEvent passed in</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="applyConfig"></a>
|
|
<div class="mdetail">
|
|
<h3>applyConfig</i></h3>
|
|
<code>public function applyConfig(<code>Object userConfig</code>, <code>Boolean init</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Applies a key-value Object literal to the configuration, replacing any existing values, and queueing the property events.
|
|
Although the values will be set, fireQueue() must be called for their associated events to execute.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>userConfig</code> : Object<div class="sub-desc">The configuration Object literal</div></li><li><code>init</code> : Boolean<div class="sub-desc">When set to true, the initialConfig will be set to the userConfig passed in, so that calling a reset will reset the properties to the passed values.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="checkBoolean"></a>
|
|
<div class="mdetail alt">
|
|
<h3>checkBoolean</i></h3>
|
|
<code>public function checkBoolean(<code>Object val</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Validates that the value passed in is a Boolean.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>val</code> : Object<div class="sub-desc">The value to validate</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Boolean</code><div class="sub-desc">true, if the value is valid</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="checkNumber"></a>
|
|
<div class="mdetail">
|
|
<h3>checkNumber</i></h3>
|
|
<code>public function checkNumber(<code>Object val</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Validates that the value passed in is a number.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>val</code> : Object<div class="sub-desc">The value to validate</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Boolean</code><div class="sub-desc">true, if the value is valid</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="fireQueue"></a>
|
|
<div class="mdetail alt">
|
|
<h3>fireQueue</i></h3>
|
|
<code>public function fireQueue()</code>
|
|
<div class="mdetail-desc">
|
|
Fires the normalized list of queued property change events
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="getConfig"></a>
|
|
<div class="mdetail">
|
|
<h3>getConfig</i></h3>
|
|
<code>public function getConfig()</code>
|
|
<div class="mdetail-desc">
|
|
Returns a key-value configuration map of the values currently set in the Config Object.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Object</code><div class="sub-desc">The current config, represented in a key-value map</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="getProperty"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getProperty</i></h3>
|
|
<code>public function getProperty(<code>String key</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Returns the value of specified property.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>key</code> : String<div class="sub-desc">The name of the property</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Object</code><div class="sub-desc">The value of the specified property</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="init"></a>
|
|
<div class="mdetail">
|
|
<h3>init</i></h3>
|
|
<code>public function init(<code>Object owner</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Initializes the configuration Object and all of its local members.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>owner</code> : Object<div class="sub-desc">The owner Object to which this Config Object belongs</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="outputEventQueue"></a>
|
|
<div class="mdetail alt">
|
|
<h3>outputEventQueue</i></h3>
|
|
<code>public function outputEventQueue()</code>
|
|
<div class="mdetail-desc">
|
|
Returns a string representation of the Config object's current CustomEvent queue
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>String</code><div class="sub-desc">The string list of CustomEvents currently queued for execution</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="queueProperty"></a>
|
|
<div class="mdetail">
|
|
<h3>queueProperty</i></h3>
|
|
<code>public function queueProperty(<code>String key</code>, <code>String value</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Sets the value of a property and queues its event to execute. If the event is already scheduled to execute, it is
|
|
moved from its current position to the end of the queue.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>key</code> : String<div class="sub-desc">The name of the property</div></li><li><code>value</code> : String<div class="sub-desc">The value to set the property to</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Boolean</code><div class="sub-desc">true, if the set was successful, false if it failed.</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="refireEvent"></a>
|
|
<div class="mdetail alt">
|
|
<h3>refireEvent</i></h3>
|
|
<code>public function refireEvent(<code>String key</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Fires the event for a property using the property's current value.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>key</code> : String<div class="sub-desc">The name of the property</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="refresh"></a>
|
|
<div class="mdetail">
|
|
<h3>refresh</i></h3>
|
|
<code>public function refresh()</code>
|
|
<div class="mdetail-desc">
|
|
Refires the events for all configuration properties using their current values.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="resetProperty"></a>
|
|
<div class="mdetail alt">
|
|
<h3>resetProperty</i></h3>
|
|
<code>public function resetProperty(<code>String key</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Resets the specified property's value to its initial value.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>key</code> : String<div class="sub-desc">The name of the property</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Boolean</code><div class="sub-desc">True is the property was reset, false if not</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="setProperty"></a>
|
|
<div class="mdetail">
|
|
<h3>setProperty</i></h3>
|
|
<code>public function setProperty(<code>String key</code>, <code>String value</code>, <code>Boolean silent</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Sets the value of a property. If the silent property is passed as true, the property's event will not be fired.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>key</code> : String<div class="sub-desc">The name of the property</div></li><li><code>value</code> : String<div class="sub-desc">The value to set the property to</div></li><li><code>silent</code> : Boolean<div class="sub-desc">Whether the value should be set silently, without firing the property event.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Boolean</code><div class="sub-desc">True, if the set was successful, false if it failed.</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="subscribeToConfigEvent"></a>
|
|
<div class="mdetail alt">
|
|
<h3>subscribeToConfigEvent</i></h3>
|
|
<code>public function subscribeToConfigEvent(<code>String key</code>, <code>Function handler</code>, <code>Object obj</code>, <code>Boolean override</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Subscribes an external handler to the change event for any given property.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>key</code> : String<div class="sub-desc">The property name</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler function to use subscribe to the property's event</div></li><li><code>obj</code> : Object<div class="sub-desc">The Object to use for scoping the event handler (see CustomEvent documentation)</div></li><li><code>override</code> : Boolean<div class="sub-desc">Optional. If true, will override "this" within the handler to map to the scope Object passed into the method.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Boolean</code><div class="sub-desc">True, if the subscription was successful, otherwise false.</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="toString"></a>
|
|
<div class="mdetail">
|
|
<h3>toString</i></h3>
|
|
<code>public function toString()</code>
|
|
<div class="mdetail-desc">
|
|
Returns a string representation of the Config object
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>String</code><div class="sub-desc">The Config object in string format.</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
<a name="unsubscribeFromConfigEvent"></a>
|
|
<div class="mdetail alt">
|
|
<h3>unsubscribeFromConfigEvent</i></h3>
|
|
<code>public function unsubscribeFromConfigEvent(<code>String key</code>, <code>Function handler</code>, <code>Object obj</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Unsubscribes an external handler from the change event for any given property.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>key</code> : String<div class="sub-desc">The property name</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler function to use subscribe to the property's event</div></li><li><code>obj</code> : Object<div class="sub-desc">The Object to use for scoping the event handler (see CustomEvent documentation)</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Boolean</code><div class="sub-desc">True, if the unsubscription was successful, otherwise false.</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Config.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="mdetail-head">Event Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="event-configChangedEvent
|
|
"></a>
|
|
<div class="mdetail">
|
|
<h3>configChangedEvent
|
|
</i></h3>
|
|
<code>public event configChangedEvent
|
|
</code>
|
|
<div class="mdetail-desc">
|
|
Object reference to the owner of this Config Object
|
|
<div class="mdetail-params">
|
|
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This event is defined by Config.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
Copyright © 2006 Jack Slocum. All rights reserved.
|
|
</body>
|
|
</html>
|
|
|