Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Cannot extend a Model extension

  1. #11
    Sencha User
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    347
    Vote Rating
    114
      0  

    Default

    I think this is also a bug. This bug happens when you extend from a model that has one or more auto field. Below is my fix for this bug. Hope that will help.
    Code:
    Ext.define('FixedDataTypes', {
        override: 'Ext.data.Types',
        AUTO: {
            convert: function(v){
                return v;
            },
            sortType: Ext.data.SortTypes.none,
            type: 'auto'
        }
    });
    BTW, I have posted this bug on the Bugs branch. See it here http://www.sencha.com/forum/showthre...th-auto-fields

  2. #12
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    53
    Answers
    1
    Vote Rating
    2
      0  

    Default The same problem in Sencha Touch 2.x

    I have a problem in Sencha Touch 2.3.1. which is very similar to this problem. The functionality is similar.

    I wanted to override onClassExtended in Ext.data.Model to fix a name clash in the validations Collection (if you add multiple validators of the same type). The override is constructed, but the onClassExtended method is not used for new instances of Model. The override doesn't work for onClassExtended. Had to modify the original source code instead - which is really bad.

Page 2 of 2 FirstFirst 12

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
  •