****  read the description to see what the problem WAS, jump to the bottom
for the fix ****

Using qooxdoo .7.1, I have some functions that I call inside message
handling code that does not always seem to work. I am using the
qx.event.message.Bus.subscribe() method to run some code when different
parts of a server call are happening. I use a start message, an update
message and an end message. The start message turns a text box background
yellow and changes the text to indicate that data is being transfered. The
update message is fired once the data has been received from the server and
before I actually do anything with it. In the update code I change the text
box background to orange and change the text to indicate processing is going
on. And in the end message I set the text box back to it's default settings.
The start message works 100% and the end message works 100%, but the update
message code changes the background color 100% of the time but the text only
changes 'sometimes'. Here is the code that is called when I receive the
update message:

function turnOrange()
{
    if (typeof Shell != 'undefined')
    {
        Shell.User.setText('Processing Data');
        Shell.User.setBackgroundColor('rgb(255,128,0)');
        cursorWait();
    }
}


Can anyone see why or know why the text does not always change but the color
does?


****************************************  FIX

I added a qx.ui.core.Widget.flushGlobalQueues just after the
setBackgroundColor call and now I get the proper updating of the display
100% of the time. I was led to believe that in .7.x there was no longer a
need to call this? But I see that it is needed in some instances. How do we
know when we need to call it and when not? I also see that calling this
function makes the function a slight (very slight) bit slower. So I guess if
I made too many of these calls in my application it might add a little bit
of slowness to it?

I am looking for comments on this from the development staff.

Thanks,
Jim
www.D4PHP.org
www.D4PHP-Hosting.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to