Apr 21, 2013, 5:43 PM
[CLOSED] Bug on plugins?
I'm trying to create a plugin to encapsulate some javascript code for specific components (instead of inherit the whole component). So far, it works fine, but, when I tried to inherit from an existing plugin, MY init function is not called anymore.
Ex.:
In both cases, my script inherits from the correct base plugin:
Ex.:
public sealed class OrganogramNodeTreeViewDragDropPlugin : TreeViewDragDrop
{
public override string InstanceOf
{
get { return "TMC.ux.OrganogramNodeTreeViewDragDropPlugin"; }
}
}
This doesn't work (the init method of my script is never called). The DragNDrop works fine in this case.public sealed class OrganogramNodeTreeViewDragDropPlugin : Plugin
{
public override string InstanceOf
{
get { return "TMC.ux.OrganogramNodeTreeViewDragDropPlugin"; }
}
}
This works fine (my plugin is initialized). Notice that I just changed the inheritance part. No scripts were changed.In both cases, my script inherits from the correct base plugin:
Ext.define("TMC.ux.OrganogramNodeTreeViewDragDropPlugin",
{
extend: "Ext.tree.plugin.TreeViewDragDrop",
alias: "plugin.tmcorganogramnodetreeviewdragdrop",
treeView: null,
init: function (treeView)
{
debugger;
console.dir(arguments);
this.callParent(arguments);
this.treeView = treeView;
}
});
What I want to do is create a specific plugin that could handle some server-side code on initialization, but inheriting from an existing plugin: public OrganogramNodeTreeViewDragDropPlugin()
{
AllowLeafDrop = true;
AppendOnly = true;
DDGroup = "OrganogramNodesEditor";
DragGroup = "OrganogramNodesEditor";
DropGroup = "OrganogramNodesEditor";
NodeHighlightOnDrop = true;
NodeHighlightOnRepair = true;
}
But I can't, because server side plugins works, but doesn't trigger the init method of MY script when inheriting anything but Plugin class =\
Last edited by Daniil; Apr 30, 2013 at 4:13 AM.
Reason: [CLOSED]