1. #1
    Sencha User
    Join Date
    Apr 2010
    Posts
    27
    Vote Rating
    0
    Vinni is on a distinguished road

      0  

    Default Ext.extend to Ext.define function?

    Ext.extend to Ext.define function?


    I am trying to port my existing 3.4 extjs application to extjs 4.1

    Code:
    var menuEvents = function(){
                        this.addEvents({
                            "HorzTaskSelected" : true,
                            "VertNodeSelected" : true,
                            "HelpSelected" : true,
                            "topmenuchanged" : true,
                            "subMenuClicked" : true,
                            "screenRedirect" : true,
                            "onResize" : true
                        });
                     };
                     
    Ext.extend(menuEvents, Ext.util.Observable);
    I am changing from Ext.extend to Ext.define for 4.1 compatibility.
    I tried below function but its not recognizing menuEvents
    Code:
    Ext.define('menuEvents', {extend:'Ext.util.Observable', tempfunction: function() {}});
    What is the correct Ext.define function here?
    Last edited by Vinni; 10 Dec 2012 at 12:54 AM. Reason: spelling mistake

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Vote Rating
    854
    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


    Observable is now a mixin so it's not really used like other classes.
    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.

Thread Participants: 1

Tags for this Thread