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?

BTW- I really like the snappyness of your demo application that you posted.
This is what got me testing the message bus as I think it will allow me to
streamline some of my code to clear up bottlenecks. Your application has the
speed that I think mine should be at and seeing yours makes me know it can
be done.

Thanks,
Jim


On 6/15/07, Christian Boulanger <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> sending and subscribing to messages works similar to dispatching and
> listening for events. So if you have a button mybutton, you write
>
> qx.event.message.Bus.subscribe("activation-message",function(message){
>     this.setEnabled(message.getData());
> }, mybutton);
>
> and within the field that should activate the button, you write, for
> example
>
> myfield.addEventListener("focus",function(){
>     qx.event.message.Bus.dispatch(new
> qx.event.message.Message("activation-message", true))
> });
>
> I will write a tutorial on messagens soon.
>
> Christian
>
>
>
> johnl wrote:
> > How do I send a message to an object? I have a DateChooserButton I want
> > to activate when clicking on a field (for the convenience of a user).
> >
> > Thanks.
> >
> > David
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> 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

Reply via email to