1. #1
    Sencha User
    Join Date
    Jan 2010
    Posts
    21
    Vote Rating
    0
    waken is on a distinguished road

      0  

    Default MVC - visual inheritance and components dependencies

    MVC - visual inheritance and components dependencies


    Hi All,
    i trying to create base controller - for visual inheritance with events.
    What was done:
    Ext.define('Default.Window', extend:'Ext.Window'.....
    with toolbar and tabpanel for two items (by xtype)
    Ext.define('Default.Form'........
    Ext.define('Default.Grid'........

    What stops me:
    how to define in base controller : (for example) button for change tabpanel active item grid<>form...for inheritance?
    Ext.define('My.Form' extends : 'Default.Form'......
    Ext.define('My.Grid' extends : 'Default.Grid'......
    Ext.define('My.Window', extends : 'Default.Window' // with tollbar and tabpanel:items{grid,form}

    How in
    Ext.define('Default.Controller'......
    create events (components dependencies) and make them available (work) in
    Ext.define('My.Controller', extends : 'Default.Controller'
    ?

    is it possible to perform?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,545
    Vote Rating
    873
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    So you want a base (abstract) controller and have other controllers extend it correct? If you are using the init method to execute this.control in the base controller and the subclass controllers then the subclass controllers need to execute this.callParent(arguments);
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    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 services@sencha.com

    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.

  3. #3
    Sencha User
    Join Date
    Jan 2010
    Posts
    21
    Vote Rating
    0
    waken is on a distinguished road

      0  

    Default


    Ok, this is the simple "konwn" part, but i have a problem with controls and events for them - created in base controller dependienes should work in subclasses.
    how definie that control-dependiences in base controller?

Thread Participants: 1

Tags for this Thread