What Is ExtJS ExtJS 4+ Extensions Examples Tutorials

10Apr/131

ExtJS 4.2 & Architect 2.2 – Plugins

I've been liking Sencha's Architect IDE more and more as it's been maturing over time. In my last post I wrote about making custom plugins in ExtJS 4, but how do you go about using them through Architect?

First step would be to ensure the we have the plugin code; I accomplished this by adding a JS Resource:

Resource

Next step should be easy enough; I figured adding a custom "plugins" property with a value of "["ux.fadeinplugin"]" on a given Panel would do the trick:

Add Plugin

...however, while this does work when tested in browser, this causes Architect's canvas to go blank, essentially rendering it useless. Upon further research, there are known bugs surrounding this, but no fix yet.

Read on for a workaround in Architect...

Turns out there's a "processConfig" method that you can set:

processConfig

This will let you write a custom method, like so:

    processThePanel: function(config) {
        config.plugins = ["ux.fadeinplugin"];
        return config;
    },

At this point, even though the underlying code that is generated is rather funky, you get a functional implementation without breaking Architect!

VN:F [1.9.22_1171]
Rating: 8.0/10 (5 votes cast)
ExtJS 4.2 & Architect 2.2 - Plugins, 8.0 out of 10 based on 5 ratings
Comments (1) Trackbacks (0)
  1. Hi, I’m new to Sencha Architect 2.x, my questions are these:

    1 – In the first step: I would like to know where you get the plugins or add codes to a resource. Js

    2 – In the second step: I wonder what kind of custom property must be added to the component in order to import the plugin.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)

Leave a comment

* Copy This Password *

* Type Or Paste Password Here *

No trackbacks yet.