It would be great if I could accomplish the following (I understand it
may involve changing parts of protoype.js to achieve this). Any help
appreciated as always.


I want to be able to hook and event that get fired whenever a method
on a class gets called (before or after the method is called, doesn't
matter which).

something like:

Event.observe("class:method", function(event) {
    // do something
});

Now I understand that you can fire 'custom' events:
window.fire("class:method", { blah: 0 });

what I'm looking for is where in prototype.js I could a hook that
would fire such an event passing the class and method as above
whenever a method on one of my classes is called.

Make sense?

No idea if it's even possible but would be great for what I'm doing...




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

Reply via email to