It is clear that Timer and Scheduler are different.

My concern is that Scheduler.scheduleDeffered behaves so differnent on 
different platforms. 

What is the best way to handle this?



Am Mittwoch, 26. November 2014 16:11:01 UTC+1 schrieb Jonathon Lamon:
>
> Timer and Scheduler.scheduleDeffered would not be expected to be 
> equivalent.  They have two different semantics.  
>
> Scheduler.scheduleDeffered - runs "after the browser event loop returns".
> new Timer().schedule(1000) - runs 1000 ms after being scheduled.
>
> You can not expect Scheduler.scheduleDeffered to give consistent results 
> across platform.
>
> Scheduler.scheduleFixedDelay would be more equivalent to Timer.schedule
>
> On Tuesday, November 25, 2014 6:47:04 AM UTC-7, confile wrote:
>>
>> It seems that the Scheduler works different on mobile and desktop when 
>> using SDM. 
>>
>> I created a demo project (
>> https://github.com/confile/GWT-2.7-Scheduler-Test) to show the problem.
>>
>> This is a demo app to test how the GWT Scheduler works different on 
>> mobile and on desktop in Super Dev Mode.
>>
>> I printed the height of a HTMLPanel for three different cases.
>>
>>    1. right after the DOM elements are inserted into the page (GWTP 
>>    onReveal())
>>    2. right after the DOM elements are inserted into the page and 
>>    Scheduler with a deferred command is executed
>>    3. right after the DOM elements are inserted into the page and a 
>>    Timer after 1000mx is fired
>>
>> Here is the difference in the console output:
>> Output on Desktop
>>    
>>    - height before Timer and Scheduler: 0
>>    - height after Scheduler: 652
>>    - height after Timer: 652
>>
>> Output on Mobile (iPhone 5, iOS 7.1.1)
>>    
>>    - height before Timer and Scheduler: 0
>>    - height after Scheduler: 425
>>    - height after Timer: 817
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/93f92371-4bfe-42c3-a1c8-44390e3fb543%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to