1.2 beta feature - MVC event.reset Enhancments

0 views
Skip to first unread message

chris thatcher

unread,
Aug 27, 2010, 1:02:27 PM8/27/10
to jquery-...@googlegroups.com
In 1.1 event.reset always reverted event.(), event.v(), and event.c() to there initial values.  
In 1.2 it is now possible to reset each individually with event.m().reset(), event.v().reset() and event.c().reset()

Here are a couple notes :

All resets() are chainable on the event. So event.c() returns the string id of the current controller, but event.c().reset() resets c internally and returns the event so you can do simple things like

//reset the model and start adding new information
event.m().reset().m({
  abc:123
  //whatever new data
}).render();

Does this seem like a reasonable approach? 


--
Christopher Thatcher

Jrad

unread,
Aug 28, 2010, 3:08:51 AM8/28/10
to jquery-claypool
Yes, it does I think :)

On Aug 27, 8:02 pm, chris thatcher <thatcher.christop...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages