Well, I've tried a couple of different things, not the
bindAsEventListener() yet.
So thinking there might be a naming conflict, I opted to change the
event parameter name to objEvent.  So now I have:

    Find: function(input, objEvent, useractive) {
    var keycode = objEvent.keyCode;

and my timer code looks like:

            var func = function(input, objEvent) { this.Find(input,
objEvent, false); };
            func = func.bind(this);
            this.timer = setTimeout(func, 300);


I'm getting the exact same error (notice I add input to the function
statement, but I have tried this with and without the additional input
parameter).

> Note, I believe .bind() automagically passes the event object along to the
> bound function these days (you just have to include it as a named param). If


What does that mean exactly?

Thanks, Karl..


On Apr 9, 2:04 pm, Ryan Gahl <ryan.g...@gmail.com> wrote:
> Try something like this:
>
> var func = function(event) { this.Find(input, event, false); };    // notice
>
> > I added the named argument "event" to the func signature
>
> Note, I believe .bind() automagically passes the event object along to the
> bound function these days (you just have to include it as a named param). If
> not, try the legacy .bindAsEventListener() instead of .bind().
>
> Ryan Gahl
> CEO
> Nth Penguin, LLChttp://www.nthpenguin.com
> --
> Inquire: 1-920-574-2218
> Blog:http://www.someElement.com
> LinkedIn Profile:http://www.linkedin.com/in/ryangahl
>
> On Thu, Apr 9, 2009 at 3:59 PM, kstubs <kst...@gmail.com> wrote:
> > var func = function() { this.Find(input, event, false); };
> >            func = func.bind(this);
> >            this.timer = setTimeout(func, 300);
--~--~---------~--~----~------------~-------~--~----~
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