-
31 Mar 2011 6:25 AM #1
[DUP][CLOSED](Beta1) Extending TreePanel error [fix attached]
[DUP][CLOSED](Beta1) Extending TreePanel error [fix attached]
Had a bit of difficulty extending a tree panel as follows:
I kept getting an error message from the Ext backend re an undefined config variable (line 75411 in ext-all-debug.js) - first line in the constructor method. It appears no check is being made for an undefined config. A quick fix as follows:Code:Ext.require([ 'Ext.tree.*', 'Ext.data.*' ]); Ext.define('App.SidebarTree', { extend: 'Ext.tree.TreePanel', initComponent: function() { var config = { border: false, animate: true, useArrows: true, autoScroll: true, height: 400, containerScroll: true, rootVisible: false, } this.buildStore(config); Ext.apply(this, Ext.apply(this.initialConfig, config)); this.callParent(arguments); }, buildStore: function(config) { config.store=new Ext.data.TreeStore({ proxy: { type: 'ajax', url: 'menu/loadTree' }, root: { nodeType : 'async', expanded : true, text : '', draggable : false, id : '/' } }); } });
Hope this helpsCode:... getRootNode : function(){}, getChecked : function(a, startNode){}, constructor: function(config) { config=config || {}; // THIS NEW LINE INSERTED HERE if (config.animate === undefined) { config.animate = Ext.enableFx; } ....------------------------------------------
Conor Armstrong
tw: @evathedog
web: rockstown.com
Ext.ux.form.AutoCombo
Ext.ux.SimpleIFrame
Ext.ux.form.ToolFieldSet
Knowledge is realising that the street is one-way, wisdom is looking both directions anyway.
-
31 Mar 2011 1:36 PM #2Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[FIXED-EXTJSIV-566][Beta1] JS error when exception sent back from Direct method
By westy in forum Ext:BugsReplies: 2Last Post: 8 Apr 2011, 7:23 AM -
[OPEN] [CLOSED]Error extending store ...
By keckeroo in forum Sencha Touch 1.x: BugsReplies: 1Last Post: 8 Nov 2010, 6:04 PM -
Extending gridpanel with tbar and attached events
By teox76 in forum Ext 3.x: Help & DiscussionReplies: 3Last Post: 4 May 2010, 7:10 AM -
[CLOSED-664] Ext.tree.TreePanel display error in WebKit / Adobe air
By piroman in forum Ext 3.x: BugsReplies: 6Last Post: 19 Mar 2010, 2:32 AM -
[2.0.2][CLOSED] Panel bug on render...fix attached
By jerrybrown5 in forum Ext 2.x: BugsReplies: 7Last Post: 7 Apr 2008, 5:47 PM


Reply With Quote