View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007991 | MMW v4 | Framework: Scripts/Extensions | public | 2011-06-22 17:25 | 2012-09-28 16:33 |
Reporter | zvezdan | Assigned To | |||
Priority | urgent | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 4.0 | ||||
Target Version | 4.0.7 | Fixed in Version | 4.0.7 | ||
Summary | 0007991: Error -2147418113 with oNode = SDB.MainTree.ParentNode(oNode) in OnNodeDragDrop [MM4] | ||||
Description | That line works fine in MM3, but not in MM4 (tested 1344, 1392, 1394). If you want to reproduce, install the Magic Nodes script, expand "Genre, Artist, Album, Dics #" node from the "Magic Nodes" folder and try to drag & drop some track to some genre's node. By the way, the oNode definitely has the parent node; in the previous example it is "Genre, Artist, Album, Dics #". | ||||
Additional Information | If you want cleaner OnNodeDragDrop event handler code then that in the mentioned script, here it is: Function CustomDragDrop(destNode, srcNode, SongList, DropType, Test) If Test Then CustomDragDrop = 2 Else Dim oTargetNode Set oTargetNode = destNode Set oTargetNode = SDB.MainTree.ParentNode(oTargetNode) End If End Function | ||||
Tags | No tags attached. | ||||
Fixed in build | 1504 | ||||
|
Petr, please review, looks like it should be fixed for 4.0. |
|
Fixed in 1395 |
|
Verified in 1395. Thanks. |
|
I am sorry but it seems that this bug is not resolved completely. After some user reported it again, I tried several older MM versions and I find out that it is not manifested in Magic Nodes until MM 4.0.6.1501. However, I wrote one test script and I am getting the mentioned error with all MM 4.x versions, even with b1395 (tested 1395, 1422, 1459, 1470 and 1501). Here is the script: Option Explicit Sub OnStartUp() Dim oParentNode Dim oChildNode Set oParentNode = SDB.MainTree.CreateNode oParentNode.Caption = "Expand this node" oParentNode.HasChildren = True SDB.MainTree.AddNode SDB.MainTree.Node_Library, oParentNode, 1 Set oChildNode = SDB.MainTree.CreateNode oChildNode.Caption = "Drop some track to this node" oChildNode.UseScript = Script.ScriptPath oChildNode.OnDragDrop = "OnDragDrop" SDB.MainTree.AddNode oParentNode, oChildNode, 3 SDB.ProcessMessages oParentNode.Expanded = True End Sub Function OnDragDrop(oDestNode, oSrcNode, oSongList, iCopyType, bJustTest) Dim oTargetNode If bJustTest Then OnDragDrop = 2 Else Set oTargetNode = oDestNode Set oTargetNode = SDB.MainTree.ParentNode(oTargetNode) If Not oTargetNode Is Nothing Then SDB.MessageBox oTargetNode.Caption, mtInformation, Array(mbOK) End If End If End Function By the way, there is a problem with the Expanded property, but I will report that as another issue since it is unrelated to this one. |
|
Fixed in build 4.0.7.1504 |
|
It seems that works fine with 1504. Thanks. |