View Issue Details

IDProjectCategoryView StatusLast Update
0009163MMW v4Framework: Scripts/Extensionspublic2012-04-26 23:35
Reporterzvezdan Assigned To 
PriorityurgentSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version4.0.5Fixed in Version4.0.5 
Summary0009163: It is not possible to use both "old" and "new" methods for registering events for same node
DescriptionoNewNode.OnDragDrop is the only "old" property for registering events which could be used together with other "new" methods. However, if I write e.g.:
oNewNode.OnEdited = "EditCustomNode"
Script.RegisterEvent oNewNode, "OnFillTracks", "FillCustomLeaf"

then FillCustomLeaf event handler would not be fired at all.

In Magic Nodes I am using mostly those "new" methods for registering events since not all "old" properties have the corresponding "new" methods (OnNodeEditText, OnCanEditNode). However, there is another bug with nodes with OnFillTracks registered using the "new" method with RegisterEvent, as I have described it in 9162 issue.
TagsNo tags attached.
Fixed in build1480

Relationships

related to 0009162 closedpetr Nodes with Script.RegisterEvent OnFillTracks don't display covers in Art Browser with Details, also problem with Column Browser 

Activities

Ludek

2012-02-23 16:04

developer   ~0030528

Last edited: 2012-02-23 16:06

Zvezdan, I tried with the following script:



Option Explicit

Sub OnStartup()
    Dim oCustomNode
    Set oCustomNode = SDB.MainTree.CreateNode
    oCustomNode.Caption = "bla bla"
    SDB.MainTree.AddNode SDB.MainTree.Node_Playlists, oCustomNode, 0

    Script.RegisterEvent oCustomNode, "OnFillTracks", "OnFillTracks"
    Script.RegisterEvent oCustomNode, "OnCanEditNode", "CanEditCustomNode"
End Sub

Sub OnFillTracks(Node)
   SDB.MessageBox "OnFillTracks", mtInformation, Array(mbOk)
End Sub

Function CanEditCustomNode(oNode)
    SDB.MessageBox "OnCanEditNode", mtInformation, Array(mbOk)
    CanEditCustomNode = false
End Function




and it works fine for me. Both events are fired. Could you confirm with the script?

Ludek

2012-02-23 16:12

developer   ~0030529

Last edited: 2012-02-23 16:51

Oh, sorry, I misread the description, you are takling about the combination of the both method types. But in your example the old "EditCustomNode" is not fired, the "CustomNodeLeaf" is fired.

Ludek

2012-02-23 16:56

developer   ~0030530

Last edited: 2012-02-23 23:31

Fixed in build 1600 and merged into 4.0.4.1480

peke

2012-04-26 23:35

developer   ~0030942

Verified 1484