Home » Eclipse Projects » Remote Application Platform (RAP) » Seems like the UICallBack mechanism get broken
|
Re: Seems like the UICallBack mechanism get broken [message #546772 is a reply to message #546479] |
Wed, 14 July 2010 07:38 |
Ivan Furnadjiev Messages: 2427 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Yury,
there is a bug related to KeyListener and UICallback:
317616: KeyListener breaks UICallback on IE, Chrome, Safari
https://bugs.eclipse.org/bugs/show_bug.cgi?id=317616
but there is no KeyListener used in the FAQ entry. Feel free to open a
bugzilla with a snippet to reproduce it.
BTW is this happen in all browsers (IE, FF, Safari, Chrome, Opera)?
Best,
Ivan
On 07/13/2010 7:36 AM, Yury wrote:
> Hi, all!
>
> I'm trying to use the way which is described here
> http://wiki.eclipse.org/RAP/FAQ#How_do_I_implement_a_key_bin ding_that_triggers_a_Command.3F
> When I start the application and set up a breakpoint to
> UICallBackServiceHandler.service() I will be suspended on it time by
> time. However, after pressing the hot keys binding and executing the
> command "org.eclipse.ui.window.nextView" in
> ExecuteCommandPhaseListener the application will never suspended at my
> break-point - seems to me that the UICallBack mechanism get broken.
> I'm not sure is it platform problem or my own application.
> Can anybody check it out and give some advise?
>
> Thanks, Yury.
|
|
|
Re: Seems like the UICallBack mechanism get broken [message #546833 is a reply to message #546772] |
Wed, 14 July 2010 11:45 |
Yury Mising name Messages: 95 Registered: May 2010 Location: Russia |
Member |
|
|
Hi, Ivan!
Thank you for your answer. I've already find the cause of my problem and it is https://bugs.eclipse.org/bugs/show_bug.cgi?id=301261 as you sad. But I find may be a little bit different solution. It is shown below. Fixes in Request.js file only.
....
// References the currently running request or null if no request is active
this._currentRequest = null;
// Running transports array
this._transports = new Array();
this._timeoutPage = "";
....
_sendStandalone : function( request ) {
// [if] Dispose the last transport before creating the new one
// see bug 301261
for (var i = 0; i < this._transports.length; i++){
var transport = this._transports[i];
var state = transport.getState();
if( transport != null &&
state != "configured" &&
state != "sending" &&
state != "receiving") {
transport.getRequest().dispose();
transport.dispose();
this._transports.splice(i, 1);
}
}
// TODO [rh] WORKAROUND
// we would need two requestQueues (one for 'normal' requests that
// is limited to 1 concurrent request and one for the 'independant'
// requests created here
// Until qooxdoo supports multiple requestQueues we create and
// send this kind of request without knownledge of the request queue
var vRequest = request;
var vTransport = new qx.io.remote.Exchange(vRequest);
// Establish event connection between qx.io.remote.Exchange instance and
// qx.io.remote.Request
vTransport.addEventListener("sending", vRequest._onsending, vRequest);
vTransport.addEventListener("receiving", vRequest._onreceiving, vRequest);
vTransport.addEventListener("completed", vRequest._oncompleted, vRequest);
vTransport.addEventListener("aborted", vRequest._onaborted, vRequest);
vTransport.addEventListener("timeout", vRequest._ontimeout, vRequest);
vTransport.addEventListener("failed", vRequest._onfailed, vRequest);
vTransport._start = (new Date).valueOf();
this._transports.push(vTransport);
vTransport.send();
// END WORKAROUND
},
and it resolved my problem.
What do you think about this fixes?
Answer for you question about browsers:
I'd checked only FF3.6 and IE8 and the problem is reproduced in IE only. FF works fine.
Thanks, Yury.
[Updated on: Wed, 14 July 2010 11:46] Report message to a moderator
|
|
|
Re: Seems like the UICallBack mechanism get broken [message #546842 is a reply to message #546833] |
Wed, 14 July 2010 12:16 |
Ivan Furnadjiev Messages: 2427 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Yury,
yes... your solution will work too. My first implementation for a fix
was similar. But way we need to keep all running transports in array, as
we can clean (dispose) them when they actually finished (completed or
failed).
Best,
Ivan
On 07/14/2010 2:45 PM, Yury wrote:
> Hi, Ivan!
>
> Thank you for your answer. I've already find the cause of my problem
> and it is https://bugs.eclipse.org/bugs/show_bug.cgi?id=301261 as you
> sad. But I find may be a little bit different solution. It is shown below
>
>
> ...
> // References the currently running request or null if no request
> is active
> this._currentRequest = null;
> // Running transports array
> this._transports = new Array();
> this._timeoutPage = "";
>
> ...
>
> _sendStandalone : function( request ) {
> // [if] Dispose the last transport before creating the new one
> // see bug 301261
> for (var i = 0; i < this._transports.length; i++){
> var transport = this._transports[i];
> var state = transport.getState();
> if( transport != null && state !=
> "configured" &&
> state != "sending" &&
> state != "receiving") {
> transport.getRequest().dispose();
> transport.dispose();
> this._transports.splice(i, 1);
> }
> }
> // TODO [rh] WORKAROUND
> // we would need two requestQueues (one for 'normal'
> requests that
> // is limited to 1 concurrent request and one for the
> 'independant'
> // requests created here
> // Until qooxdoo supports multiple requestQueues we create and
> // send this kind of request without knownledge of the
> request queue
> var vRequest = request;
> var vTransport = new qx.io.remote.Exchange(vRequest);
> // Establish event connection between qx.io.remote.Exchange
> instance and
> // qx.io.remote.Request
> vTransport.addEventListener("sending", vRequest._onsending,
> vRequest);
> vTransport.addEventListener("receiving", vRequest._onreceiving,
> vRequest);
> vTransport.addEventListener("completed", vRequest._oncompleted,
> vRequest);
> vTransport.addEventListener("aborted", vRequest._onaborted,
> vRequest);
> vTransport.addEventListener("timeout", vRequest._ontimeout,
> vRequest);
> vTransport.addEventListener("failed", vRequest._onfailed, vRequest);
> vTransport._start = (new Date).valueOf();
> this._transports.push(vTransport);
> vTransport.send();
> // END WORKAROUND
> },
>
>
> and it resolved my problem.
> What do you think about this fixes?
>
> Answer for you question about browsers:
> I'd checked only FF3.6 and IE8 and the problem is reproduced in IE
> only. FF works fine.
>
>
> Thanks, Yury.
|
|
| |
Goto Forum:
Current Time: Tue Sep 24 02:54:26 GMT 2024
Powered by FUDForum. Page generated in 0.70045 seconds
|