Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Seems like the UICallBack mechanism get broken
Seems like the UICallBack mechanism get broken [message #546479] Tue, 13 July 2010 04:34 Go to next message
Yury Mising name is currently offline Yury Mising nameFriend
Messages: 95
Registered: May 2010
Location: Russia
Member
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?
The problem is in IE 8 and RAP 1.3, FireFox works fine.

Thanks, Yury.

[Updated on: Tue, 13 July 2010 06:36]

Report message to a moderator

Re: Seems like the UICallBack mechanism get broken [message #546772 is a reply to message #546479] Wed, 14 July 2010 07:38 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
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 Go to previous messageGo to next message
Yury Mising name is currently offline Yury Mising nameFriend
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 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
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.
Re: Seems like the UICallBack mechanism get broken [message #547019 is a reply to message #546479] Thu, 15 July 2010 03:00 Go to previous message
Yury Mising name is currently offline Yury Mising nameFriend
Messages: 95
Registered: May 2010
Location: Russia
Member
Hi, Ivan.

I've applied your patch - it works good and seems better than my own fixes. Thanks for advise!
Previous Topic:could not evaluate javascript response: Invalid characters?
Next Topic:IE popup dialog: "A script on this page is causing Internet Explorer to run slowly. ..."
Goto Forum:
  


Current Time: Tue Dec 07 16:33:30 GMT 2021

Powered by FUDForum. Page generated in 0.02239 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top