2

I have used infragistics igGrid in my application but I am getting javascript error

Object doesn't support property or method "_super"

I know this can be avoided but I want to give it fake implementation (or real answer, may be adding some missing reference) for some reasons. I tried following but not working.

var _super = function(a,s,d,f,g,h) {
}

I have wrote above code before referencing igGrid JS libraries.

In code, _super has variable number of arguments when calling it.

Konstantin Dinev
  • 34,219
  • 14
  • 75
  • 100
Imad
  • 7,126
  • 12
  • 55
  • 112

2 Answers2

1

If I understand correctly you are trying to use _super out of scope. You can use _super in the objects scope like this :

(function ($) {

    $.ig.RPCDataSource = $.ig.RPCDataSource || $.ig.RESTDataSource.extend({

    _processJsonResponse: function (data, context) {
            try {
               console.log('my special preprocessing');
               return this._super(data, context);
            } catch (e) {
                console.log(e.message);
                // my special error handling
            } 
        },
   });
}(jQuery));

UPDATE _super is a method from the jQuery widget factory. iG controls are built upon jQuery Widget. Therefore _super is defined in jQuery widget.

Konstantin Dinev
  • 34,219
  • 14
  • 75
  • 100
Ognyan Dimitrov
  • 6,026
  • 1
  • 48
  • 70
  • I am not using super anywhere, library is using it internally. But it is not defined anywhere – Imad Apr 27 '16 at 06:40
1

You're probably referencing a version of jQuery UI that still doesn't have _super and _superApply implemented. Try referencing the latest version and the error should go away.

https://bugs.jqueryui.com/ticket/6861

Konstantin Dinev
  • 34,219
  • 14
  • 75
  • 100