PDA

View Full Version : MVC Master/Detail & delegates



deshartman
24 Apr 2012, 4:15 PM
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.

Thanks
Des

mitchellsimoens
26 Apr 2012, 7:31 AM
The view shouldn't set itself to listen for events, the controller should do this.