View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009163 | MMW v4 | Framework: Scripts/Extensions | public | 2012-02-21 22:12 | 2012-04-26 23:35 |
Reporter | zvezdan | Assigned To | |||
Priority | urgent | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 4.0.5 | Fixed in Version | 4.0.5 | ||
Summary | 0009163: It is not possible to use both "old" and "new" methods for registering events for same node | ||||
Description | oNewNode.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. | ||||
Tags | No tags attached. | ||||
Fixed in build | 1480 | ||||
|
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? |
|
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. |
|
Fixed in build 1600 and merged into 4.0.4.1480 |
|
Verified 1484 |