Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#8354 closed defect (fixed)

Bug in latest version of Tree.js wrong signature in prototype call for dijit.tree.ForestStoreModel

Reported by: Obchelli Owned by: anonymous
Priority: high Milestone: 1.3
Component: General Version: 1.2.3
Keywords: dijit.tree.ForestStoreModel pastItem Cc: georgechkheidze@…
Blocked By: Blocking:

Description

Problem in following function of dijit.tree.ForestStoreModel?

Currently we have:

pasteItem: function(/*Item*/ childItem, /*Item*/ oldParentItem, /*Item*/ newParentItem, /*Boolean*/ bCopy, /*int?*/ insertIndex){

1404 summary:
1405 Move or copy an item from one parent item to another.
1406
Used in drag & drop
1407 if(oldParentItem === this.root){
1408 if(!bCopy){
1409 It's onLeaveRoot()'s responsibility to modify the item so it no longer matches
1410
this.query... thus triggering an onChildrenChange() event to notify the Tree
1411 that this element is no longer a child of the root node
1412 this.onLeaveRoot(childItem);
1413 }
1414 }
1415 dijit.tree.TreeStoreModel?.prototype.pasteItem.call(this, childItem,
1416 oldParentItem === this.root ? null : oldParentItem,
1417 newParentItem === this.root ? null : newParentItem,
1418 insertIndex
1419 );
1420 if(newParentItem === this.root){
1421
It's onAddToRoot()'s responsibility to modify the item so it matches
1422 this.query... thus triggering an onChildrenChange() event to notify the Tree
1423
that this element is now a child of the root node
1424 this.onAddToRoot(childItem);
1425 }
1426 },
1427

And in dijit.tree.TreeStoreModel? same function is defined with following signature

1197 pasteItem: function(/*Item*/ childItem, /*Item*/ oldParentItem, /*Item*/ newParentItem, /*Boolean*/ bCopy, /*int?*/ insertIndex){ 1198 summary: 1199

On line 1418 bCopy parameter is missing - causing 'undefined' for insertIndex parameter

should be bCopy, insertIndex instead.

Change History (2)

comment:1 Changed 11 years ago by bill

Resolution: fixed
Status: newclosed

(In [16235]) Missing parameter to pasteItem() call, fixes #8354 !strict.

comment:2 Changed 11 years ago by bill

Milestone: tbd1.3

Thanks for catching that.

Note: See TracTickets for help on using tickets.