Let's back up... give me the whole blob of code... sorry I thought func was
being executed AS an element event handler, but it's clearly not. If you
paste in the rest of the (relevant) code as it sits now I can help you fix
it up.


Ryan Gahl
CEO
Nth Penguin, LLC
http://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 4:26 PM, kstubs <[email protected]> wrote:

>
> 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 <[email protected]> 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 <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to