Params for Timeout

Hi Dan,
Would it be possible to have a params argument for Timeout?
Thank you.
James

What would it look like? We do have an obj that is received by the callback. It holds the time property and a clear() method to clear the timeout. An interval() has the obj too that has the time, the count and the clear()

Hi Dan,
Thank you for considering this. I don't have a project in mind currently, but I know it's one of those things I keep meaning to ask you about.

Imagine calling a function from the timeout and you want it to pass an argument for that function, much the same as you can for an animation animate{call:thisFunction, params:thisColour}.
Perhaps in a field of carrots the one I just watered creates a timeout and the argument is which carrot was watered??
I always find a way around it but I think it might be handy. What do you think?

I appreciate you thinking about it.
Thanks James

I see. We already pass it a timeout or interval object so it would end up being that the params are the second parameter received... mind you for the animate calls we pass the target but if params are there we pass the params - could do something like that with interval and timeout - will give it some thought.

1 Like

Thanks Dan. Not to worry if not.