--
You received this message because you are subscribed to the Google Groups "JavaScriptMVC" group.
To post to this group, send email to javasc...@googlegroups.com.
To unsubscribe from this group, send email to javascriptmv...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascriptmvc?hl=en.
Sent from my iPhone
Controller.prototype.setupCreate the jQuery pluginGo through the list of methods, check if they are an actionIf they are an action, save the processor and the parts
Processors:Set up the controller in data, it's element, so it can be destroyed, etcGo through the cached actions, use the processor to bind a callback to the action's method.
It's quite simple in concept. However, there a lot of weird logic to make controllers easy to add new processors and run fast.Processors are something that takes a selector / event pair, an element, a controller, and a callback, and binds that callback appropriately. It returns a function that when called, unbinds the callback.