I want to use the MultiSelect from 3.3 in Ext JS 4, as described in this previous question:
It seems like the way to register xtypes has changed in Ext JS 4. When I try to import this widget,along with ItemSelector.js, I get an error on Ext.reg().
Ext.reg('multiselect', Ext.ux.form.MultiSelect); //backwards compat Ext.ux.Multiselect = Ext.ux.form.MultiSelect;
How do I change wdigets to get them to work in Ext JS 4?
The Ext JS 4 way is to use the new class system to create your widget: http://www.sencha.com/blog/countdown-to-ext-js-4-dynamic-loading-and-new-class-system/
Make sure you assign your widget an alias using the "widget" namespace. For example:
Ext.define('Ext.ux.form.MultiSelect', {
extend: 'ClassNameYouAreExtending',
alias: 'widget.multiselect'
});
Then you can refer to the widget by the xtype 'multiselect'. When you use an xtype in Ext JS 4 it looks for a class with an alias of 'widget.[xtype]'.