upgraded to yui 0.12.0
upgraded to yui-ext 0.33 rc2
This commit is contained in:
parent
62b3d90db7
commit
cfd09a5cb6
1271 changed files with 539033 additions and 0 deletions
686
www/extras/yui/docs/YAHOO.util.CustomEvent.html
Normal file
686
www/extras/yui/docs/YAHOO.util.CustomEvent.html
Normal file
|
|
@ -0,0 +1,686 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>API: event YAHOO.util.CustomEvent (YUI Library)</title>
|
||||
<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css">
|
||||
<link rel="stylesheet" type="text/css" href="assets/api.css">
|
||||
</head>
|
||||
|
||||
<body id="yahoo-com">
|
||||
<div id="doc3" class="yui-t2">
|
||||
|
||||
<div id="hd">
|
||||
<h1>Yahoo! UI Library</h1>
|
||||
<h3>Event Utility </h3>
|
||||
<p>
|
||||
<a href="./index.html">Yahoo! UI Library</a>
|
||||
> <a href="./module_event.html">event</a>
|
||||
> YAHOO.util.CustomEvent
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="bd">
|
||||
<div id="yui-main">
|
||||
<div class="yui-b">
|
||||
|
||||
|
||||
<h2>
|
||||
|
||||
|
||||
|
||||
|
||||
Class <b>YAHOO.util.CustomEvent</b>
|
||||
<span class="extends">
|
||||
</span>
|
||||
|
||||
<span class="extends">
|
||||
</span>
|
||||
|
||||
</code>
|
||||
</h2>
|
||||
<!-- class tree goes here -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="summary description">
|
||||
The CustomEvent class lets you define events for your application
|
||||
that can be subscribed to by one or more independent component.
|
||||
</div>
|
||||
|
||||
<div class="section constructor details">
|
||||
<h3><a name="constructor_detail">Constructor</a></h3>
|
||||
<div class="content">
|
||||
<div class="detail">
|
||||
<strong>YAHOO.util.CustomEvent</strong>
|
||||
<code>
|
||||
(
|
||||
|
||||
|
||||
|
||||
type
|
||||
|
||||
,
|
||||
oScope
|
||||
|
||||
,
|
||||
silent
|
||||
)
|
||||
</code>
|
||||
<div class="description">
|
||||
<dl>
|
||||
<dt>Parameters:</dt>
|
||||
<dd>
|
||||
<code>type
|
||||
<String>
|
||||
</code>
|
||||
The type of event, which is passed to the callback
|
||||
when the event fires
|
||||
</dd>
|
||||
<dd>
|
||||
<code>oScope
|
||||
<Object>
|
||||
</code>
|
||||
The context the event will fire from. "this" will
|
||||
refer to this object in the callback. Default value:
|
||||
the window object. The listener can override this.
|
||||
</dd>
|
||||
<dd>
|
||||
<code>silent
|
||||
<boolean>
|
||||
</code>
|
||||
pass true to prevent the event from writing to
|
||||
the log system
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section field details">
|
||||
<h3><a name="field_detail">Properties</a></h3>
|
||||
<div class="content">
|
||||
<h4><a name="scope">scope</a>
|
||||
<code>- object</code>
|
||||
</h4>
|
||||
<div class="detail">
|
||||
<div class="description">
|
||||
The scope the the event will fire from by default. Defaults to the window
|
||||
obj
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<hr />
|
||||
<h4><a name="signature">signature</a>
|
||||
<code>- int</code>
|
||||
</h4>
|
||||
<div class="detail">
|
||||
<div class="description">
|
||||
Custom events support two styles of arguments provided to the event
|
||||
subscribers.
|
||||
<ul>
|
||||
<li>YAHOO.util.CustomEvent.LIST:
|
||||
<ul>
|
||||
<li>param1: event name</li>
|
||||
<li>param2: array of arguments sent to fire</li>
|
||||
<li>param3: <optional> a custom object supplied by the subscriber</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>YAHOO.util.CustomEvent.FLAT
|
||||
<ul>
|
||||
<li>param1: the first argument passed to fire. If you need to
|
||||
pass multiple parameters, use and array or object literal</li>
|
||||
<li>param2: <optional> a custom object supplied by the subscriber</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<hr />
|
||||
<h4><a name="silent">silent</a>
|
||||
<code>- boolean</code>
|
||||
</h4>
|
||||
<div class="detail">
|
||||
<div class="description">
|
||||
By default all custom events are logged in the debug build, set silent
|
||||
to true to disable logging for this event.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<hr />
|
||||
<h4><a name="subscribers">subscribers</a>
|
||||
<code>- Subscriber[]</code>
|
||||
</h4>
|
||||
<div class="detail">
|
||||
<div class="description">
|
||||
The subscribers to this event
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<hr />
|
||||
<h4><a name="type">type</a>
|
||||
<code>- string</code>
|
||||
</h4>
|
||||
<div class="detail">
|
||||
<div class="description">
|
||||
The type of event, returned to subscribers when the event fires
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<hr />
|
||||
<h4><a name="YAHOO.util.CustomEvent.FLAT">YAHOO.util.CustomEvent.FLAT</a>
|
||||
<code>- static int</code>
|
||||
</h4>
|
||||
<div class="detail">
|
||||
<div class="description">
|
||||
Subscriber listener sigature constant. The FLAT type returns two
|
||||
parameters: the first argument passed to fire and the optional
|
||||
custom object
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<hr />
|
||||
<h4><a name="YAHOO.util.CustomEvent.LIST">YAHOO.util.CustomEvent.LIST</a>
|
||||
<code>- static int</code>
|
||||
</h4>
|
||||
<div class="detail">
|
||||
<div class="description">
|
||||
Subscriber listener sigature constant. The LIST type returns three
|
||||
parameters: the event type, the array of args passed to fire, and
|
||||
the optional custom object
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section method details">
|
||||
<h3><a name="methodDetails">Methods</a></h3>
|
||||
<div class="content">
|
||||
<h4>
|
||||
<a name="_delete">_delete</a></h4>
|
||||
<div class="detail">
|
||||
<code>
|
||||
private
|
||||
|
||||
|
||||
void
|
||||
<strong>_delete</strong>
|
||||
(
|
||||
)
|
||||
</code>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Returns:
|
||||
<code>
|
||||
void
|
||||
</code></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr />
|
||||
<h4>
|
||||
<a name="fire">fire</a></h4>
|
||||
<div class="detail">
|
||||
<code>
|
||||
|
||||
|
||||
|
||||
void
|
||||
<strong>fire</strong>
|
||||
(
|
||||
|
||||
|
||||
arguments
|
||||
|
||||
|
||||
)
|
||||
</code>
|
||||
|
||||
<div class="description">
|
||||
Notifies the subscribers. The callback functions will be executed
|
||||
from the scope specified when the event was created, and with the
|
||||
following parameters:
|
||||
<ul>
|
||||
<li>The type of event</li>
|
||||
<li>All of the arguments fire() was executed with as an array</li>
|
||||
<li>The custom object (if any) that was passed into the subscribe()
|
||||
method</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
<dl>
|
||||
<dt>Parameters:</dt>
|
||||
<dd>
|
||||
<code>arguments <Object*></code>
|
||||
an arbitrary set of parameters to pass to
|
||||
the handler.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt>Returns:
|
||||
<code>
|
||||
void
|
||||
</code></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr />
|
||||
<h4>
|
||||
<a name="subscribe">subscribe</a></h4>
|
||||
<div class="detail">
|
||||
<code>
|
||||
|
||||
|
||||
|
||||
void
|
||||
<strong>subscribe</strong>
|
||||
(
|
||||
|
||||
|
||||
fn
|
||||
|
||||
|
||||
,
|
||||
obj
|
||||
|
||||
|
||||
,
|
||||
override
|
||||
|
||||
|
||||
)
|
||||
</code>
|
||||
|
||||
<div class="description">
|
||||
Subscribes the caller to this event
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
<dl>
|
||||
<dt>Parameters:</dt>
|
||||
<dd>
|
||||
<code>fn <Function></code>
|
||||
The function to execute
|
||||
</dd>
|
||||
<dd>
|
||||
<code>obj <Object></code>
|
||||
An object to be passed along when the event
|
||||
fires
|
||||
</dd>
|
||||
<dd>
|
||||
<code>override <boolean|Object></code>
|
||||
If true, the obj passed in becomes
|
||||
the execution scope of the listener.
|
||||
if an object, that object becomes the
|
||||
the execution scope.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt>Returns:
|
||||
<code>
|
||||
void
|
||||
</code></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr />
|
||||
<h4>
|
||||
<a name="toString">toString</a></h4>
|
||||
<div class="detail">
|
||||
<code>
|
||||
|
||||
|
||||
|
||||
void
|
||||
<strong>toString</strong>
|
||||
(
|
||||
)
|
||||
</code>
|
||||
|
||||
<div class="description">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Returns:
|
||||
<code>
|
||||
void
|
||||
</code></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr />
|
||||
<h4>
|
||||
<a name="unsubscribe">unsubscribe</a></h4>
|
||||
<div class="detail">
|
||||
<code>
|
||||
|
||||
|
||||
|
||||
boolean
|
||||
<strong>unsubscribe</strong>
|
||||
(
|
||||
|
||||
|
||||
fn
|
||||
|
||||
|
||||
,
|
||||
obj
|
||||
|
||||
|
||||
)
|
||||
</code>
|
||||
|
||||
<div class="description">
|
||||
Unsubscribes the caller from this event
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
<dl>
|
||||
<dt>Parameters:</dt>
|
||||
<dd>
|
||||
<code>fn <Function></code>
|
||||
The function to execute
|
||||
</dd>
|
||||
<dd>
|
||||
<code>obj <Object></code>
|
||||
The custom object passed to subscribe (optional)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt>Returns:
|
||||
<code>
|
||||
boolean
|
||||
</code></dt>
|
||||
<dd>True if the subscriber was found and detached.</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr />
|
||||
<h4>
|
||||
<a name="unsubscribeAll">unsubscribeAll</a></h4>
|
||||
<div class="detail">
|
||||
<code>
|
||||
|
||||
|
||||
|
||||
void
|
||||
<strong>unsubscribeAll</strong>
|
||||
(
|
||||
)
|
||||
</code>
|
||||
|
||||
<div class="description">
|
||||
Removes all listeners
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Returns:
|
||||
<code>
|
||||
void
|
||||
</code></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section method details">
|
||||
<h3><a name="methodDetails">Events</a></h3>
|
||||
<div class="content">
|
||||
<h4>
|
||||
<a name="subscribeEvent">subscribeEvent</a></h4>
|
||||
<div class="detail">
|
||||
<code>
|
||||
|
||||
|
||||
|
||||
<strong>subscribeEvent</strong>
|
||||
|
||||
(
|
||||
|
||||
|
||||
fn
|
||||
|
||||
|
||||
,
|
||||
obj
|
||||
|
||||
|
||||
,
|
||||
override
|
||||
|
||||
|
||||
)
|
||||
|
||||
</code>
|
||||
|
||||
<div class="description">
|
||||
Custom events provide a custom event that fires whenever there is
|
||||
a new subscriber to the event. This provides an opportunity to
|
||||
handle the case where there is a non-repeating event that has
|
||||
already fired has a new subscriber.
|
||||
</div>
|
||||
|
||||
<div class="description">
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Parameters:</dt>
|
||||
<dd>
|
||||
<code>fn <Function></code>
|
||||
The function to execute
|
||||
</dd>
|
||||
<dd>
|
||||
<code>obj <Object></code>
|
||||
An object to be passed along when the event
|
||||
fires
|
||||
</dd>
|
||||
<dd>
|
||||
<code>override <boolean|Object></code>
|
||||
If true, the obj passed in becomes
|
||||
the execution scope of the listener.
|
||||
if an object, that object becomes the
|
||||
the execution scope.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="yui-b">
|
||||
<div class="nav">
|
||||
|
||||
<div class="module">
|
||||
<h4>Modules</h4>
|
||||
<ul class="content">
|
||||
<li><a href="module_animation.html">animation</a></li>
|
||||
<li><a href="module_autocomplete.html">autocomplete</a></li>
|
||||
<li><a href="module_calendar.html">calendar</a></li>
|
||||
<li><a href="module_connection.html">connection</a></li>
|
||||
<li><a href="module_container.html">container</a></li>
|
||||
<li><a href="module_dom.html">dom</a></li>
|
||||
<li><a href="module_dragdrop.html">dragdrop</a></li>
|
||||
<li><a href="module_event.html">event</a></li>
|
||||
<li><a href="module_logger.html">logger</a></li>
|
||||
<li><a href="module_menu.html">menu</a></li>
|
||||
<li><a href="module_slider.html">slider</a></li>
|
||||
<li><a href="module_tabview.html">tabview</a></li>
|
||||
<li><a href="module_treeview.html">treeview</a></li>
|
||||
<li><a href="module_yahoo.html">yahoo</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="module">
|
||||
<h4>Classes</h4>
|
||||
<ul class="content">
|
||||
<li><a href="YAHOO.util.CustomEvent.html">YAHOO.util.CustomEvent</a></li>
|
||||
<li><a href="YAHOO.util.Event.html">YAHOO.util.Event</a></li>
|
||||
<li><a href="YAHOO.util.EventProvider.html">YAHOO.util.EventProvider</a></li>
|
||||
<li><a href="YAHOO.util.Subscriber.html">YAHOO.util.Subscriber</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="module">
|
||||
<h4>Files</h4>
|
||||
<ul class="content">
|
||||
<li><a href="CustomEvent.js.html">CustomEvent.js</a></li>
|
||||
<li><a href="Event.js.html">Event.js</a></li>
|
||||
<li><a href="EventProvider.js.html">EventProvider.js</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="module">
|
||||
<h4>Properties</h4>
|
||||
<ul class="content">
|
||||
<li><a href="#scope">scope</a>
|
||||
<!--<code><int></code>-->
|
||||
</li>
|
||||
<li><a href="#signature">signature</a>
|
||||
<!--<code><int></code>-->
|
||||
</li>
|
||||
<li><a href="#silent">silent</a>
|
||||
<!--<code><int></code>-->
|
||||
</li>
|
||||
<li><a href="#subscribers">subscribers</a>
|
||||
<!--<code><int></code>-->
|
||||
</li>
|
||||
<li><a href="#type">type</a>
|
||||
<!--<code><int></code>-->
|
||||
</li>
|
||||
<li><a href="#YAHOO.util.CustomEvent.FLAT">YAHOO.util.CustomEvent.FLAT</a>
|
||||
<!--<code><int></code>-->
|
||||
</li>
|
||||
<li><a href="#YAHOO.util.CustomEvent.LIST">YAHOO.util.CustomEvent.LIST</a>
|
||||
<!--<code><int></code>-->
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="module">
|
||||
<h4>Methods</h4>
|
||||
<ul class="content">
|
||||
<li><!--<code>void</code>-->
|
||||
<a href="#_delete">_delete</a>
|
||||
</li>
|
||||
<li><!--<code>void</code>-->
|
||||
<a href="#fire">fire</a>
|
||||
</li>
|
||||
<li><!--<code>void</code>-->
|
||||
<a href="#subscribe">subscribe</a>
|
||||
</li>
|
||||
<li><!--<code>void</code>-->
|
||||
<a href="#toString">toString</a>
|
||||
</li>
|
||||
<li><!--<code>boolean</code>-->
|
||||
<a href="#unsubscribe">unsubscribe</a>
|
||||
</li>
|
||||
<li><!--<code>void</code>-->
|
||||
<a href="#unsubscribeAll">unsubscribeAll</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="module">
|
||||
<h4>Events</h4>
|
||||
<ul class="content">
|
||||
<li>
|
||||
<a href="#subscribeEvent">subscribeEvent</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ft">
|
||||
<hr />
|
||||
Copyright © 2006 Yahoo! Inc. All rights reserved.
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue