Results 1 to 2 of 2

Thread: MVC Master/Detail & delegates

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    69
    Vote Rating
    2
      0  

    Default 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.

    Thanks
    Des

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      -1  

    Default

    The view shouldn't set itself to listen for events, the controller should do this.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •