PDA

View Full Version : [FIXED] Can't create an instance of a plugin with Ext.PluginManager.create



r_honey
19 Nov 2011, 7:06 AM
Things seem to be very fishy with the whole plugin framework in Touch 2. Try registering a plugin with Ext.preg, e.g.:



Ext.preg('pullrefresh', Ext.plugins.PullRefreshPlugin);


and then creating an instance of it:



Ext.PluginManager.create({ptype:'pullrefresh'})


and you get an error. If you look at sources for PluginManager.registerType and PluginManager.create, the reason becomes obvious. registerType registers plugin information only locally within PluginManager class but "create" tries to use Ext.createByAlias to create an instance.

mitchellsimoens
19 Nov 2011, 12:47 PM
Thank you for the report. We are still on PR2 so we should expect not everything to work but this will get fleshed out very soon.

r_honey
19 Nov 2011, 9:27 PM
I understand Mitchell...

Jamie Avins
5 Dec 2011, 10:58 AM
This is fixed in the next release. Though PullToRefresh specifically isn't quite complete yet.

r_honey
5 Dec 2011, 1:53 PM
Okay, thanks for the update Jamie!!