Have anybody used Event.fire method appeared in v1.6. There are no samples, references or even api for this method. I want to use it for my needs and don''t know how. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Have anybody used Event.fire method appeared in v1.6. There are no samples, references or even api for this method. I want to use it for my needs and don''t know how. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
http://prototypejs.org/api/element/fire Best, -Nicolas On Dec 18, 2007 12:10 PM, Rauan Maemirov <rauan1987-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Have anybody used Event.fire method appeared in v1.6. There are no > samples, references or even api for this method. I want to use it for > my needs and don''t know how. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
So, how can I e.g. call ''keydown'' event with fire()? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
You can''t simulate events consistently across all browsers, so you can''t fire a "custom" keydown, if you need to handle keys both from keydown and custom events, then I would, on keydown, fire the custom event and have only one handler for it. element.observe("keydown", function(e) { this.fire("custom:keydown", { key: event.keyCode || event.charCode }) }); element.observe("custom:keydown", function(event) { // handle here your keydown logic, using event.memo.key to access the key code. }); Best, -Nicolas On Dec 18, 2007 12:48 PM, Rauan Maemirov <rauan1987-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > So, how can I e.g. call ''keydown'' event with fire()? > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On 18/12/2007, Rauan Maemirov <rauan1987-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Have anybody used Event.fire method appeared in v1.6. There are no > samples, references or even api for this method. I want to use it for > my needs and don''t know how.http://dev.rubyonrails.org/attachment/ticket/10100/testfire.html sort of thing. I use this to allow me to load multiple scripts where one of the scripts can''t start executing until another one is complete. You will need a fix though (http://dev.rubyonrails.org/ticket/10100) if you want to handle custom events prior to the DOM being loaded. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---