Results 1 to 2 of 2

Thread: Ext.extend to Ext.define function?

  1. #1
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    27
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,412
    Vote Rating
    1288
      0  

    Default

    Observable is now a mixin so it's not really used like other classes.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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.

Tags for this Thread

Posting Permissions

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