-
2 Oct 2012 12:44 AM #1
touch-charts-2.0.0-beta - TreeStore [BUG]
touch-charts-2.0.0-beta - TreeStore [BUG]
Using Sencha Touch 2.0.1.1 with touch-charts-2.0.0-beta package
I found the following bug in the Ext.data.TreeStore object :
in an attempt to insert a new child node, the new node is correctly inserted under the parent node
but is replicated under the root node.
Here is the sample code:
Ext.define ('ListItem', {
extend: 'Ext.data.Model',
config: {
fields: ['text']
}
});
var data = {id: 'root', items: [{id: 'x1', text: 'Item1'},
{id: 'x2', text: 'Item2'},
{id: 'x3', text: 'Item3'}]};
var treeStore = Ext.create ('Ext.data.TreeStore', {
model: 'ListItem',
defaultRootProperty: 'items',
root: data
});
...
treeStore.getRoot (). findChild ('id', 'x1', false)
.appendChild ({text: 'SubItem1', leaf: true});
The new 'SubItem1' node is correctly entered under the 'Item1' node but is incorrectly replicated under the 'root' node
Thanks in advance.
-
2 Oct 2012 4:59 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
Have you tried this in a later release?
Also, Touch Charts 2 beta is really deprecated in favor of the rewrite in Sencha Touch 2.1.0 b1/2/3Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
4 Oct 2012 3:54 AM #3
With the "Sencha Touch 2.1.0 b3", the problem does not occur,
but I wanted to delay the release upgrade.
Thanks anyway!
Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.


Reply With Quote