The following patch to qx.event.message.Bus saves a lot of typing:
Instead of
qx.event.message.Bus.dispatch(
new qx.event.message.Message( "myapp.messages.foo", data )
);
you can not write
qx.event.message.Bus.dispatch( "myapp.messages.foo", data );
Please apply.
Thanks!
Christian
Index:
F:/xampp/htdocs/qooxdoo-0.7-sdk/frontend/framework/source/class/qx/event/message/Bus.js
===================================================================
---
F:/xampp/htdocs/qooxdoo-0.7-sdk/frontend/framework/source/class/qx/event/message/Bus.js
(revision 9588)
+++
F:/xampp/htdocs/qooxdoo-0.7-sdk/frontend/framework/source/class/qx/event/message/Bus.js
(working copy)
@@ -175,12 +175,18 @@
* dispatch message and call subscribed functions
*
* @type static
- * @param msg {qx.messagebus.Message} message which is being dispatched
+ * @param msg {qx.messagebus.Message|String} message which is being
dispatched
* @return {boolean} TODOC
*/
dispatch : function(msg)
{
- // todo: check for valid qx.messagebus.Message
+ // if string value has been supplied, create new message
+ if ( typeof msg == "string" )
+ {
+ var value = typeof arguments[1] != "undefined"
? arguments[1] : true;
+ msg = new qx.event.message.Message( msg, value
);
+ }
+
var sub = this.getSubscriptions();
var msgName = msg.getName();
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel