On Oct 1, 12:12 pm, John Tamplin <[email protected]> wrote: > If your test code ultimately involves callbacks from the browser event loop > from your own code, you need to wrap all such calls in $entry, which hooks > up the uncaught exception handler and the Scheduler hooks. All of the GWT > widgets/etc that do this already take care of it, but if you write your own > you have to handle it. > > Look at JsopRequest for an example, but basically if you set a callback > foo.callback = function()... then that should instead be > foo.callback=$entry(function()...). > > -- > John A. Tamplin > Software Engineer (GWT), Google
I'm not sure I entirely understand. Are you suggesting that I need to convert all of my DeferredCommand calls to ones that use some new native method implementation so I can wrap my callbacks in $entry? I'm not sure what that accomplishes since DeferredCommand already does that. When it starts a timer, the timer code wraps the callback in $entry. It also seems like a heavy burden to impose on the test developers when GWT is already maintaining a list of callbacks. If there was a DeferredCommand.cancelAll, I could call that manually myself although I'm suggesting that perhaps the GWT test case should do that for us. That would also catch any DeferredCommands that may have been executed in the production code. I'm not sure how to cancel outstanding RPC calls if that's even possible. Also, I see the calls to $entry in GWT source but I don't really have any idea what it does other than hook at the uncaught exception handler as you just noted. And BTW, my apologies for starting this thread so early. I generally try to avoid getting help for things I should have been able to figure out on my own :-( -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
