On 7/8/10 3:26 PM, Ed Leafe wrote:
> On Jul 8, 2010, at 3:19 PM, Nate Lowrie wrote:
>
>    
>>>> I had originally looked at the callAfterInterval, but discarded it for 
>>>> some reason I cannot remember.
>>>>          
>>>         Nate: why callAfterInterval() instead of callEvery()?
>>>        
>> I didn't know that it existed.  I echo Doug's question of how do you
>> kill it when you are done.
>>      
>
> def callEvery(interval, func, *args, **kwargs):
>       """Creates and returns a timer object that fires the specified function
>       at the specified interval. Interval is given in milliseconds. It will 
> pass along
>       any additional arguments to the function when it is called.
>       """
>
>       So hold the reference to the timer, and call either timer.stop() or 
> timer.release().
>    
I like it because I can decouple the cancel from the update UI method.  
Is there any way to pass the function dynamic arguments, like passing it 
a function or lambda and having it evaluate the function to get the 
argument everytime the timed function is called?

Regards,

Nate
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to