Error upgrading from ExtJs3 to ExtJs4 - '' udefined members '' in compatibility mode?

I am upgrading my project from Ext3.3 to Ext4.
I added the ext3-core-compat.js and ext3-compat.js after adding the new ext4 ext-all-debug.js .

I get members is udefined error on line 3262 of ext-all-debug.js file.
Which is inside the Ext.extend method, which takes 3 parameters:

 Ext.extend = function(subclass, superclass, members) 

I can see from ExtJs4 documentation that Ext.extend is deprecated, however I just want my code to work before I change all my Ext.extend to Ext.define .

Any help guys?

+1
source share
2 answers

I assume that you are using anonymous constructor syntax, for example:

 MyClass = function(config) { ... } Ext.extend(MyClass, SomeOtherClass, { ... }); 

If so, this form cannot be detected using Ext4 or the compatibility level and must be updated manually to the new standard Ext.define syntax. I am not sure if this is mentioned in the migration documentation, and if not, I will add it.

+2
source

Assuming that you have followed the steps described in ExtJS 3 through 4 of the migration guide , I don’t think there is anything else that can be done other than manually viewing your application and making changes. According to a Sencha blog post on migration (my attention):

JS 3 compatibility level

This consists of a set of files that, after enabling Ext JS 4, provide overrides that will load existing Ext JS 3 code to work under Ext JS 4. The goal of this level is not to enable your application to run unmodified Ext JS 4 long-term ones. On the contrary, you should use this layer only as a temporary tool for full migration to Ext JS 4 . The goal of this is to help make the transition as quick and painless as possible. Instead of debugging incomprehensible errors from a blank screen, you can quickly return your application to a displayed and functional state using the compatibility level, which will greatly simplify the transition to the latest architecture.

0
source

All Articles