Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Multiple eventName's for Event observe?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ngan Pham  
View profile  
 More options Oct 22, 1:50 pm
From: Ngan Pham <nganp...@gmail.com>
Date: Thu, 22 Oct 2009 10:50:36 -0700
Local: Thurs, Oct 22 2009 1:50 pm
Subject: Multiple eventName's for Event observe?

It would be nice if Event#observe's eventName argument was able to take an
array, or perhaps a comma delimited string so that it can attach to multiple
events in one call:
Event.observe(something, 'keyup,mouseup', this.blah.bind(this));
or
Event.observe(something, ['keyup', 'mouseup'], this.blah.bind(this));


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Allen Madsen  
View profile  
 More options Oct 22, 2:12 pm
From: Allen Madsen <bla...@gmail.com>
Date: Thu, 22 Oct 2009 14:12:44 -0400
Local: Thurs, Oct 22 2009 2:12 pm
Subject: Re: [Prototype-core] Multiple eventName's for Event observe?
I would prefer something more like this:
http://gist.github.com/166475

I think it is a rare use case that you would apply the same action to
many events on the same object. However, I think it is much more
common to apply multiple actions to events on the same object at one
time.

Of the two solutions you mention though, I would prefer the first.

Allen Madsen
http://www.allenmadsen.com


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Deadelus  
View profile  
 More options Nov 4, 4:10 am
From: Deadelus <johanm...@gmail.com>
Date: Wed, 4 Nov 2009 01:10:55 -0800 (PST)
Local: Wed, Nov 4 2009 4:10 am
Subject: Re: Multiple eventName's for Event observe?
I have to agree with Allen on this one. The mentioned usage would work
perfectly for me.

On Oct 22, 7:12 pm, Allen Madsen <bla...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google