Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Browser execute() mechanism kills existing JS(How can you send multiple execute() methods to completion)
Browser execute() mechanism kills existing JS [message #640674] Mon, 22 November 2010 18:44 Go to next message
Steve R is currently offline Steve RFriend
Messages: 2
Registered: November 2010
Junior Member
I'm not entirely sure on the exact problem but the symptoms are the following:

We have a bunch of jQuery animations running.

We call execute() again, and it seems to stop it running, you can see this here:
http://imagebin.org/124153

Basically each line fades in, and when they are quick in succesion the previous ones don't bother finishing. The gaps in the image, are actually parts that didn't get very far in the animation.

Is there a reason why execute() would kill the previous requests, and how can we work around this?



Re: Browser execute() mechanism kills existing JS [message #640931 is a reply to message #640674] Tue, 23 November 2010 15:00 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2151
Registered: July 2009
Senior Member
Hi,

I haven't heard of this before. All js execution is managed by the
underlying native browser, so it's possible that this would work in some
implementations but not in others, due to either a bug or a design
difference.

One possible workaround you can try is to do your execute()s in an
asyncExec(...) block so that they're run when the event queue is idle (which
_may_ indicate that the fade has completed). I'm not sure if this will
help, but if you want to try it, do your execute() like:

browser.getDisplay().asyncExec(new Runnable() {
public void run() {
if (browser.isDisposed()) return;
browser.execute(...);
}
});

If this does not help then it's hard to know what's happening here or if it
can be worked around without a test case. It would also be helpful to know
if it happens in the different native browser implementations (eg.- on
Windows the Browser embeds IE, on Linux it embeds either gecko/mozilla or
webkitgtk, etc.). If you're able to reduce your case to a small case that
reproduces the problem (ideal template:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet148 .java )
then please log a report with swt at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=SWT .

Grant


"Steve R" <eclipse@sjrx.net> wrote in message
news:icedeu$egr$1@news.eclipse.org...
> I'm not entirely sure on the exact problem but the symptoms are the
> following:
> We have a bunch of jQuery animations running.
>
> We call execute() again, and it seems to stop it running, you can see this
> here:
> http://imagebin.org/124153
>
> Basically each line fades in, and when they are quick in succesion the
> previous ones don't bother finishing. The gaps in the image, are actually
> parts that didn't get very far in the animation.
> Is there a reason why execute() would kill the previous requests, and how
> can we work around this?
>
>
>
>
Re: Browser execute() mechanism kills existing JS [message #641338 is a reply to message #640931] Thu, 25 November 2010 04:58 Go to previous message
Steve R is currently offline Steve RFriend
Messages: 2
Registered: November 2010
Junior Member
Okay so after many attempts at trying to make a test case, we are convinced that it's something with jQuery and something else... execute() doesn't seem to kill currently running JS.

Thanks

[Updated on: Thu, 25 November 2010 04:58]

Report message to a moderator

Previous Topic:Drawing a border around a Combo
Next Topic:Tableviewer reset
Goto Forum:
  


Current Time: Fri Dec 15 10:23:40 GMT 2017

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

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