[Proto-Scripty] Re: Correct use Event.on form submit

2012-06-27 Thread Victor


 That is not conveniently tied to any event handler, so what is the 
 convenient means of disconnecting it, as in __eventHandler.stop(); ?


Sorry, I've not completely understood this phrase. I'll repeat myself:

// start observer - bindAsEventListener isn't needed
this.__z__handleSubmit = this.form.on('submit', 
this.__handleSubmit.bind(this)); 
// stop observer
this.__z__handleSubmit.stop(); 

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/aybuwVFGdvUJ.
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.



[Proto-Scripty] Re: Correct use Event.on form submit

2012-06-26 Thread Victor


 Is this correct?
 this.__z__handleSubmit = this.form.on('submit', this.__handleSubmit.
 bindAsEventListener(this)); 
 Is the bindAsEventListener necessary?  I want to get back the Event 
 Handler so I can later destroy it with:
 this.__z__handleSubmit.stop(); 

 
this.__handleSubmit.bind(this) should be enough

http://proto-scripty.wikidot.com/prototype:tip-you-probably-don-t-need-bindaseventlistener

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/EbOYyQsKdy8J.
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.



[Proto-Scripty] Re: Correct use Event.on form submit

2012-06-26 Thread kstubs
Victor,
That is not conveniently tied to any event handler, so what is the 
convenient means of disconnecting it, as in __eventHandler.stop(); ?
Karl..

On Tuesday, June 26, 2012 3:42:55 AM UTC-7, Victor wrote:

 Is this correct?
 this.__z__handleSubmit = this.form.on('submit', this.__handleSubmit.
 bindAsEventListener(this)); 
 Is the bindAsEventListener necessary?  I want to get back the Event 
 Handler so I can later destroy it with:
 this.__z__handleSubmit.stop(); 

  
 this.__handleSubmit.bind(this) should be enough


 http://proto-scripty.wikidot.com/prototype:tip-you-probably-don-t-need-bindaseventlistener


-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/LkJR3dFxrckJ.
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.