I am making a reference to the Javascript function splice() on an array and I get the error:
“Cannot make a static reference to the non-static function splice()”
What’s going on – how is this a static reference, aren’t I referencing an instance of an Array class and its method – how is that static?
$(document).ready( function() {
var queryPreds = new Array();
var queryObjs = new Array();
function remFromQuery(predicate) {
for(var i=0; i<arrayName.length;i++ ) {
if(queryPreds[i]==predicate)
queryPreds.splice(i,1);
queryObjs.splice(i,1);
}
}
}
That’s not a Javascript engine message. It sounds like you’re using an IDE that provides syntax checking and such. If you’re using Eclipse, perhaps you’re running into this bug, which has been fairly recently fixed.