Class Index | File Index

Classes


Class Ozone.eventing.WidgetProxy


Defined in: WidgetProxy.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Ozone.eventing.WidgetProxy(wid, functions, srcId, proxy)
Creates or updates a proxy - This is a private constructor - Do not call this directly.
Field Summary
Field Attributes Field Name and Description
 
id
Id of the Widget that this proxy represents
 
Flag which represents if the Widget this proxy represents
Method Summary
Method Attributes Method Name and Description
 
onReady(readyListener, readyListenerScope)
Registers a listener function to be executed when the Widget has called notifyReady
 
sendMessage(dataToSend)
Sends a direct message to the Widget this proxy represents
Class Detail
Ozone.eventing.WidgetProxy(wid, functions, srcId, proxy)
Creates or updates a proxy - This is a private constructor - Do not call this directly. The other Widget APIs such as Widget Intents may return a proxy. A proxy may contain dynamic functions that were registered by the origin widget.
Parameters:
{String} wid
Id of the Widget this proxy represents
{Object[]} functions
Array of objects representing proxy functions
{String} srcId
Id of the source Widget who is using the proxy
{Ozone.eventing.WidgetProxy} proxy Optional
A existing proxy object to be used, instead of creating a new instance
Field Detail
id
Id of the Widget that this proxy represents

isReady
Flag which represents if the Widget this proxy represents
Method Detail
onReady(readyListener, readyListenerScope)
Registers a listener function to be executed when the Widget has called notifyReady
var widgetProxy = OWF.RPC.getWidgetProxy(id);
widgetProxy.onReady(function() { console.log("Other widget is ready!"); });
Parameters:
{function} readyListener
function to execute
{Object} readyListenerScope
scope for the function to execute with

sendMessage(dataToSend)
Sends a direct message to the Widget this proxy represents
var widgetProxy = OWF.RPC.getWidgetProxy(id);
widgetProxy.sendMessage({data:'foo'});
Parameters:
{Object} dataToSend

Documentation generated by JsDoc Toolkit 2.3.2 on Fri Oct 05 2012 16:51:05 GMT-0400 (EDT)