Hi Tobie,

You don't live over in Scott's Valley, do you?   Used to know a Tobie
way back when.

OK so,

xtimer = setTimeout( { doSomething( arg1, arg2, arg3 ); }, 500);

is using the function's return?

How do I specifiy a function to setTimeout when it has args?

Holy Simple Minded Idiot Batman!  It's not a timer memory leak
problem.

Riddle me this Robin ...   do you think this programmer could use some
Bat Belt and Suspenders?

Holy Mistaken Bug Identity Batman!   Definitely!



BearState


On Mar 2, 6:55 pm, Tobie Langel <tobie.lan...@gmail.com> wrote:
> Hi again, BearState.
>
> Your confusing different things here.
>
> The behaviour you are describing isn't related to memory leaks at all,
> your most probably just passing the _result_ of a function call to
> setTimeout rather than the function itself.
>
> In other words, if you are doing the following, you're almost
> certainly doing something wrong (or using some very obscure functional
> programming tricks):
>
> setTimeout(myFunc(), 1000); // WRONG
>
> This, on the contrary, works you're passing the function itself, not
> the _result_ of it):
>
> setTimeout(myFunc, 1000); // CORRECT
>
> Anyway, if you're doing ajax requests, you should NOT be using
> timeouts, but the provided callback system (as advised in a previous
> post).
>
> I suggest you buy yourself a good book on Prototype[1] and maybe one
> on JavaScript too, while you're at it. ;)
>
> Best,
>
> Tobie
>
> [1]http://prototypejs.org/2008/8/11/practical-prototype-and-scriptaculous
> orhttp://prototypejs.org/2007/5/7/prototype-and-script-aculo-us-the-bun...
>
> On Mar 3, 1:43 am, BearState <wixelb...@yahoo.com> wrote:
>
>
>
> > Hidie-ho,
>
> > Well Ok, I've used setTimeout a few times in my code to delay resuming
> > run of a code module until Ajax.Request() has had time to do its
> > thing.   And the use of the timer is cyclic as the user may repeat the
> > operation over and over again, but in different parts of the page.
>
> > And ...  holy spacetime wormhole continuum out of wack batman!  Why is
> > that timer firing off so quickly?   What in the wide wide world of
> > sports is go'n on?
>
> > Robin, haven't you done a web search yet?   There's people complaining
> > about memory leaks with regard to timers?
>
> > Holy abscent minded browser batman!   Is it the setTimeout() function
> > causing the problem?
>
> > Damned if I know Robin, I only stomp on Penquins and Jokers, not
> > memory leaks and I'm not int he habit of waiting for anything, not
> > even queues at the bank when I cash my checks.
>
> > Holy Fast Food Diet out the window with Cheese, Fries and Shake
> > Batman!  What's the answer?
>
> > You weren't listening Robin ...  damned if I know.
>
> > Does anyone know?
>
> > BearState- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to