Monthly Archives: August 2011
Trailing comma in JavaScript
When trying to find a trailing comma error in JavaScript/JSON (mostly for Internet Explorer) regular expressions come in nicely. Search for the following: ,\s+} It matches a comma followed by one or more whitespaces (tabs, spaces, line breaks), followed by … Continue reading
Posted in Coding, ExtJS, Javascript
Leave a comment
ExtJS – Method previous is undefined
Having a ‘method.$previous is undefined’ error in ExtJS 4? You’re probably calling ‘callOverridden‘ instead of ‘callParent‘ when extending a class. Ext.define(‘MyApp.controller.BaseController’, { extend: ‘Ext.app.Controller’, myFunction: function() { console.log(‘myFunction in BaseController’); } }); Ext.define(‘MyApp.controller.SpecificController’, { extend: ‘MyApp.controller.BaseController’, myFunction: function() { this.callOverridden(arguments); … Continue reading