24 Apr 2012 4:15 PM #1
MVC Master/Detail & delegates
I'm converting an iOS application to Sencha and was wondering if there are any examples of a fairly typical pattern from iOS in Sencha. The pattern is delegation.
The master view passes a piece of information and sets itself as the delegate for events on the detail view. Typical example is a row on a list is clicked and the detail view you edit the info. When done editing, the detail view calls a Done method on the master and "passes" the information back async.
Is there an example of how to do this in Sencha? I'm using the Architect, so focussing on using MVC like code as far as possible. Any help would be great.
26 Apr 2012 7:31 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
The view shouldn't set itself to listen for events, the controller should do this.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.