1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    15
    Answers
    2
    Vote Rating
    0
    dhiraj17 is on a distinguished road

      0  

    Default Unanswered: Getting 'Uncaught TypeError: object is not a function' in chrome

    Unanswered: Getting 'Uncaught TypeError: object is not a function' in chrome


    Here is my view code:

    Code:
    var editor = Ext.create('Ext.grid.plugin.RowEditing', {
        clicksToEdit: 1
    });
    
    
    editor.on({
        scope: this,
        afteredit: function (roweditor, changes, record, rowIndex) {        
            alert(record);
        }
    });
    
    
    Ext.define('Employee.view.EmpList', {
        extend: 'Ext.grid.Panel',
        alias: 'widget.EmpList',
        store: 'Employees',
        title: 'Employees',
        id: 'EList',
        height: 200,
        width: 500,
        plugins: [editor],
        selType: 'rowmodel',
        initComponent: function () {
            this.columns = [
                { header: 'Employee ID', dataIndex: 'EmpID', flex: 1, hidden: true },
                { header: 'First Name', dataIndex: 'FirstName', flex: 1, editor: { allowblank: false} },
                { header: 'Last Name', dataIndex: 'LastName', flex: 1, editor: { allowblank: false} },
                { header: 'Email', dataIndex: 'Email', flex: 1, editor: { allowblank: false, vtype: 'email'} }
            ];
    
    
            this.callParent(arguments);
        }
    });
    This code works fine in Firefox but its doesnot work in chrome. If comment the editor n take out the plugin line from grid it works fine in chrome as well. Also if use ext-all.js instead of ext-debug.js then it works fine as well. I get this error:
    • [COLOR=red !important]Uncaught TypeError: object is not a function[/COLOR]
      • [COLOR=red !important](anonymous function)[/COLOR]
      • [COLOR=red !important]Ext.ClassManager.instantiate[/COLOR]ext-debug.js:6634
      • [COLOR=red !important](anonymous function)[/COLOR]ext-debug.js:2448
      • [COLOR=red !important](anonymous function)[/COLOR]EmpList.js:1

        Also when i edit the record when the code works i.e in firefox then i get the 'record' as undefined.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,081
    Answers
    675
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    See if this will work better for you:

    Code:
    var editor = Ext.create('Ext.grid.plugin.RowEditing', {
        clicksToEdit: 1,
        listeners: {
            afteredit: function (roweditor, changes, record, rowIndex) {        
                alert(record);
            }
        }
    });
    Regards,
    Scott.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    15
    Answers
    2
    Vote Rating
    0
    dhiraj17 is on a distinguished road

      0  

    Default Problem still exists

    Problem still exists


    Thanks for the reply Scott. I tried your solution bt this still do not solve any of the problems.

  4. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    14
    Vote Rating
    0
    lqjack is on a distinguished road

      0  

    Default


    first you should clean you cache,<br>then ,<br>&nbsp;if you use Ext.create() before ,some time the store cause the problem

Thread Participants: 2