Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    14
    Vote Rating
    0
    seclar is on a distinguished road

      0  

    Default Bug? - Ext.data.Model. IE 8 and Chrome

    Bug? - Ext.data.Model. IE 8 and Chrome


    I have the following code doing a combobox remote load/'live search' thing, mostly cribbed from the samples. The field is added to a form in a tab panel, and when I open the third panel, it blows up on the 'Ext.define' line.

    If I load panels that don't contain this field, then I don't get any problems. If I close the tabs after I open them I still get the error on the third invocation.

    The error occurs in Chrome (13.0.782.218) and IE8 (8.0.7601.1.17514). It doesn't occur in Firefox 6.0

    If I put a breakpoint on the bad line in Chrome then it crashes the entire Chrome tab (Aw, snap, something went wrong).

    Code:
    Ext.define("Post", {          extend: 'Ext.data.Model',
              proxy: {
                  type: 'ajax',
                  url : 'api/ui/label/type.json',
                  reader: {
                      type: 'json',
                      root: 'items',
                  }
              },
          
              fields: [
              { name: 'wholeString', mapping: 'wholeString' },
              { name: 'labelName', mapping: 'labelName' }
              ]
          });
          
          ds = Ext.create('Ext.data.Store', {
              pageSize: 0,
              model: 'Post',
          autoLoad: false,
          data: [
              { wholeString: json.value, labelName: json.value }
          ]
          });
    
    
          var field = {
          xtype: 'combo',
          width: 600,
          store: ds,
          displayField: 'wholeString',
          name: json.name,
          value: json.value,
          typeAhead: false,
          hideTrigger: true,
          fieldLabel: json.label,
    
    
          listConfig: {
              loadingText: 'Searching...',
              emptyText: 'No labels found',
              getInnerTpl: function() {
              return '<div class="labelSearchResultItem"> {labelName}</div>';
              }
          },
          pageSize: 0
          };
    ext-all-debug.js snippet
    Code:
        setWriter: function(writer) {
            if (writer === undefined || typeof writer == 'string') {
                writer = {
                    type: writer
                };
            }
    
    
            if (!(writer instanceof Ext.data.writer.Writer)) {
                Ext.applyIf(writer, {
                    model: this.model,
                    type : this.defaultWriterType
                });
    
    
                writer = Ext.createByAlias('writer.' + writer.type, writer);  // this is line 25976
            }
            
            this.writer = writer;
            
            return this.writer;
        },

    The stacktrace from Chrome:

    Code:
    ext-all-debug.js:25976Uncaught TypeError: Cannot read property 'type' of undefined
    Ext.define.setWriterext-all-debug.js:25976
    Ext.define.setModelext-all-debug.js:25919
    Ext.define.constructorext-all-debug.js:25907
    Base.callParentext-all-debug.js:2833
    Ext.define.constructorext-all-debug.js:26100
    Ext.Class.Class.newClassext-all-debug.js:3067
    anonymous:2
    Manager.Ext.ClassManager.instantiateext-all-debug.js:3787
    Manager.Ext.ClassManager.instantiateByAliasext-all-debug.js:3737
    (anonymous function)ext-all-debug.js:1521
    Ext.define.inheritableStatics.setProxyext-all-debug.js:26567
    data.onBeforeClassCreatedext-all-debug.js:26549
    Loader.Ext.Loader.requireext-all-debug.js:4438
    (anonymous function)ext-all-debug.js:1521
    data.onBeforeClassCreatedext-all-debug.js:26527
    Ext.Class.Class.processext-all-debug.js:3127
    Ext.Class.Class.processext-all-debug.js:3132
    Manager.registerPostprocessor.itemsext-all-debug.js:4672
    Loader.Ext.Loader.requireext-all-debug.js:4438
    Manager.registerPostprocessor.itemsext-all-debug.js:4639
    Ext.Class.Class.processext-all-debug.js:3131
    Ext.Class.Class.processext-all-debug.js:3132
    Ext.Class.Classext-all-debug.js:3136
    Manager.Ext.ClassManager.createext-all-debug.js:3668
    (anonymous function)ext-all-debug.js:1521

  2. #2
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Hmm I suggest you post this in the bug forum, following the bug template from the sticky thread there. Without knowing the additional information in the template it's hard to tell what's causing this
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  3. #3
    Sencha User
    Join Date
    Dec 2010
    Posts
    14
    Vote Rating
    0
    seclar is on a distinguished road

      0  

    Default


    Thanks.

    I've stopped it happening. I was creating the Model each time I added a field that used it, and that's where it was blowing up. I moved the Model definition to a better place (so it happens only once) and it's now usable in Chrome and IE again.

    In this case it's probably user error, but it probably oughtn't be breaking just on (what I suppose is essentially) a redefinition of a Model. I will whip it into shape for a bug post later.

Thread Participants: 1

Tags for this Thread