Results 1 to 5 of 5

Thread: Problem with simple subclassing

  1. #1
    Sencha User
    Join Date
    Aug 2010
    Location
    Fairfax, VA
    Posts
    19
    Answers
    1
    Vote Rating
    0
      0  

    Default Problem with simple subclassing

    Hello,

    I am trying out some simple subclassing but i bomb out whenever i subclass two levels deep.

    I think i am missing something fundamental about extjs4 subclassing.

    Ext.ns('MyApp');

    Ext.define('MyApp.BaseClass',
    {
    extend: 'Ext.Panel',
    xtype: 'x-panel-myapp-base-class'
    });

    Ext.define('MyApp.FirstClass',
    {
    extend: 'MyApp.BaseClass',
    xtype: 'x-panel-myapp-first-class'
    });

    Ext.define('MyApp.SecondClass',
    {
    extend: 'MyApp.BaseClass',
    xtype: 'x-panel-myapp-second-class'
    });

    Ext.application(
    {
    name: 'MyApp',
    ...

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,381
    Answers
    3997
    Vote Rating
    1536
      0  

    Default

    You don't need to do the Ext.ns, Ext.define will make sure the namespace is available.

    What's the trouble? Simple code like you provided should work no problems.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Aug 2010
    Location
    Fairfax, VA
    Posts
    19
    Answers
    1
    Vote Rating
    0
      0  

    Default Mitchell, Please see the attached files for particulars

    Mitchell,

    Please see the attached files for particulars.

    I changed the "xtype" to "alias" as per a post on ExtJS4 i found
    (http://stackoverflow.com/questions/5...type-in-extjs4)

    Thanks,

    -Eric
    Attached Files Attached Files

  4. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,381
    Answers
    3997
    Vote Rating
    1536
      0  

    Default

    ah... yes, skipped over that... xtype is not a valid property but alias is.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  5. #5
    Sencha User
    Join Date
    Aug 2010
    Location
    Fairfax, VA
    Posts
    19
    Answers
    1
    Vote Rating
    0
      0  

    Default Still failing to render

    It seems to still fail to render even with alias instead of xtype

Posting Permissions

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