View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007177 | MMW v4 | Framework: Scripts/Extensions | public | 2011-01-15 10:34 | 2011-02-08 00:22 |
Reporter | zvezdan | Assigned To | |||
Priority | immediate | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 4.0 | ||||
Target Version | 4.0 | Fixed in Version | 4.0 | ||
Summary | 0007177: SDB.SelectedSongList.Count is not correct after SDBForm.ShowModal [b1343] | ||||
Description | After opening some modal window (maybe even modeless, didn't tested that), SDB.SelectedSongList.Count returns 0 and SDB.SelectedSongList is unknown object even if there are one or more selected tracks. This works fine with 4.0.0.1333 and before, but not with 4.0.0.1343. This bug is very serious, causing errors and incorrect behavior in my scripts. | ||||
Additional Information | Option Explicit Sub OnStartup() Dim oMenuItem Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0) oMenuItem.Caption = SDB.Localize("Test SelectedSongList") oMenuItem.UseScript = Script.ScriptPath oMenuItem.OnClickFunc = "Test" End Sub Sub Test(oItem) Dim oForm Dim lblInfo Dim chkSelTracks Dim btnCancel Dim oCtrlTimer Dim iModalResult Set oForm = SDB.UI.NewForm oForm.Common.SetRect 100, 100, 300, 130 oForm.Caption = SDB.Localize("Test") Set lblInfo = SDB.UI.NewLabel(oForm) lblInfo.Caption = "Selected tracks: " & SDB.SelectedSongList.Count lblInfo.Common.SetRect 10, 10, 300, 17 Set chkSelTracks = SDB.UI.NewCheckBox(oForm) chkSelTracks.Common.SetRect 10, 30, 300, 20 chkSelTracks.Caption = "Just click on me!" Script.RegisterEvent chkSelTracks.Common, "OnClick", "chkSelTracks_OnClick" Set btnCancel = SDB.UI.NewButton(oForm) btnCancel.Caption = SDB.Localize("&Close") btnCancel.Common.SetRect 200, 60, 70, 25 btnCancel.Cancel = True btnCancel.ModalResult = 2 Set oCtrlTimer = SDB.CreateTimer(5000) Script.RegisterEvent oCtrlTimer, "OnTimer", "oCtrlTimer_OnTimer" oCtrlTimer.Enabled = True iModalResult = oForm.ShowModal End Sub Sub chkSelTracks_OnClick(oCtrl) SDB.MessageBox "Selected tracks: " & SDB.SelectedSongList.Count, mtInformation, Array(mbOK) End Sub Sub oCtrlTimer_OnTimer(oTimer) oTimer.Enabled = False SDB.MessageBox "Selected tracks: " & SDB.SelectedSongList.Count, mtInformation, Array(mbOK) End Sub | ||||
Tags | No tags attached. | ||||
Fixed in build | 1345 | ||||
|
Setting as Immediate, so that it doesn't break many scripts. An automated regression test for this and related issues might be useful. |
|
I can't reproduce in current build. |
|
Steps to reproduce the problem: 1. Copy test script to Auto folder and restart the program (b1343); 2. select one or more tracks in the main tracklist; 3. choose Edit / Test SelectedSongList; 4. click on the checkbox or wait for 5 seconds -> you would get dialog box saying there is 0 selected tracks. Do the same with b1333 or 3.x and you would get displayed the actual number of selected tracks. |
|
I've tried your script in development version and can't reproduce. Retest that in next build, please. |
|
It is not resolved with 1344. |
|
Works fine for me as well... (build 1344) :-? |
|
Can you send me your screenshot ? is that clean installation ? Also debuglog would help. |
|
http://img87.imageshack.us/img87/6781/mmselected.png Sorry, but I found it is a bug with old versions (3.2) as well. Also, I found that it is happening only if I have undocked the Now Playing panel. SDB.SelectedSongList.Count before ShowModal displays number of selected tracks in the main tracklist (as it should since it is the last which had focus), and after ShowModal it displays number of selected tracks in the Now Playing panel. Since I had 0 selected tracks in NP, I got SDB.SelectedSongList.Count = 0. |
|
Fixed in 1345 |
|
Verified 1346 |