Jim, I think Derrell is right here - messages are disposed after all subscribers have been notified.
Christian Derrell Lipman schrieb: > > > On 9/5/07, *Jim Hunter* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Christian, > > I was excited to see this bit of information so I tried out some > tests to see what I could do with messages and I am not able to > pass data like your sample shows. When I do the exact same thing > as you have, the getData() is null. Is there a typo in your code > or what might I be doing wrong? Here is a quick sample of what I > tried: > > qx.event.message.Bus.subscribe('transport-update', > function(message){ > window.setTimeout(function(x){ > alert(message.getData()) > },0) > } > ) > > > var req = new qx.io.remote.Request('test.txt'); > req.addEventListener('completed', function(e){ > s = e.getData().getContent(); > qx.event.message.Bus.dispatch(new > qx.event.message.Message('transport-update'), s); > }); > req.send(); > > When the file is loaded it dispatches the 'transport-update' > message and when the alert fires in the message.Bus event, it says > 'null' when it should have the info stored in s. If I pass in true > like you did, I get the same results, null. > > Any thoughts? > > > Jim, without doing any experimenting, it looks to me like the event > may no longer exist when your timeout eventually fires. You might try > saving it in a local variable (with a closure) like this to see if it > makes any difference: > > qx.event.message.Bus.subscribe('transport-update', > function(message){ > var data = message.getData(); > window.setTimeout(function(x){ > alert(data) > },0) > } > ) > > Derrell > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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 > ------------------------------------------------------------------------- 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
