View Issue Details

IDProjectCategoryView StatusLast Update
0011316MMW v4Framework: Scripts/Extensionspublic2013-09-29 15:12
Reporterzvezdan Assigned To 
PrioritynoneSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0011316: ISDBTree::CurrentNode cannot be compared with any tree node object
DescriptionCurrentNode object cannot be compared even with itself, i.e. (SDB.MainTree.CurrentNode Is SDB.MainTree.CurrentNode) returns always False! Even comparison between different objects set by the same CurrentNode returns False. Here is the test script:

Option Explicit

Sub OnStartUp()
    Dim oMenuItem

    Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_Tree, 0, 0)
    oMenuItem.Caption = "Test CurrentNode"
    oMenuItem.OnClickFunc = "Test"
    oMenuItem.UseScript = Script.ScriptPath
End Sub

Sub Test(oMenuItem)
    Dim oCurNode
    Dim oCurNode2
    Dim oNewNode

    Set oCurNode = SDB.MainTree.CurrentNode
    Set oCurNode2 = SDB.MainTree.CurrentNode
    Set oNewNode = oCurNode
    SDB.MessageBox (oCurNode Is SDB.MainTree.CurrentNode) & vbCr _
            & (SDB.MainTree.CurrentNode Is SDB.MainTree.CurrentNode) & vbCr _
            & (oCurNode Is oCurNode) & vbCr _
            & (oCurNode Is oCurNode2) & vbCr _
            & (oCurNode Is oNewNode), mtInformation, Array(mbOk)
End Sub


Only the third and fifth comparisons return True (oCurNode Is oCurNode) and (oCurNode Is oNewNode), but not (oCurNode Is SDB.MainTree.CurrentNode), nor (SDB.MainTree.CurrentNode Is SDB.MainTree.CurrentNode), nor (oCurNode Is oCurNode2).

The only comparison which is possible with CurrentNode is with Nothing.
TagsNo tags attached.
Fixed in build

Activities

There are no notes attached to this issue.