View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007369 | MMW v4 | Framework: Scripts/Extensions | public | 2011-02-13 11:06 | 2011-02-13 11:06 |
Reporter | zvezdan | Assigned To | |||
Priority | none | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Summary | 0007369: OnFillTracks is not fired after OnNodeFocused in some cases | ||||
Description | Here is the test script which could always reproduce this issue in MM4, however I cannot find in which occasions this happens in MM3 (but it happens): Option Explicit Dim oMyNode1 Dim oMyNode2 Sub OnStartup() Dim oMenuItem Set oMyNode1 = SDB.MainTree.CreateNode oMyNode1.Caption = "Test Node 1" Script.RegisterEvent oMyNode1, "OnFillTracks", "OnFillTracks" SDB.MainTree.AddNode SDB.MainTree.Node_Library, oMyNode1, 1 Set oMyNode2 = SDB.MainTree.CreateNode oMyNode2.Caption = "Test Node 2" Script.RegisterEvent oMyNode2, "OnFillTracks", "OnFillTracks" SDB.MainTree.AddNode oMyNode1, oMyNode2, 3 Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0) oMenuItem.Caption = "Disable OnNodeFocused" oMenuItem.UseScript = Script.ScriptPath oMenuItem.OnClickFunc = "Disable_Focused" Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0) oMenuItem.Caption = "Enable OnNodeFocused" oMenuItem.UseScript = Script.ScriptPath oMenuItem.OnClickFunc = "Enable_Focused" Enable_Focused oMenuItem End Sub Sub OnFillTracks(oCurNode) If Not oCurNode Is Nothing Then MsgBox "OnFillTracks" & vbCr & oCurNode.Caption Else MsgBox "OnFillTracks - oCurNode Is Nothing" End If End Sub Function OnNodeFocused(oCurNode) If Not oCurNode Is Nothing Then MsgBox "OnNodeFocused" & vbCr & oCurNode.Caption Else MsgBox "OnNodeFocused - oCurNode Is Nothing" End If End Function Sub Enable_Focused(oMenuItem) Script.RegisterEvent oMyNode1, "OnNodeFocused", "OnNodeFocused" Script.RegisterEvent oMyNode2, "OnNodeFocused", "OnNodeFocused" End Sub Sub Disable_Focused(oMenuItem) Script.UnRegisterHandler "OnNodeFocused" End Sub | ||||
Steps To Reproduce | A1. Select Playlist or some other built-in topmost node; A2. exit MM, put the test script in the Auto folder and start MM again; A3. expand Test Node 1; A4. click on Test Node 2 -> OnFillTracks is not fired; A5. click on Test Node 1 -> OnFillTracks is not fired. B1. Select Playlist or some other built-in topmost node; B2. exit MM, put the test script in the Auto folder and start MM again; B3. click on Test Node 1 -> OnFillTracks is fired; B4. expand Test Node 1; B5. click on Test Node 2 -> OnFillTracks is fired. If you disable OnNodeFocused using the menu option, OnFillTracks is fired even in the A) example. | ||||
Tags | No tags attached. | ||||
Fixed in build | |||||