View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0011115 | MMW v4 | Framework: Scripts/Extensions | public | 2013-07-28 13:33 | 2013-08-29 21:33 |
Reporter | zvezdan | Assigned To | |||
Priority | urgent | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 4.1 | ||||
Target Version | 4.1 | Fixed in Version | 4.1 | ||
Summary | 0011115: Strange behavior of ISDBSongData object | ||||
Description | Here is the test script: Option Explicit Sub OnStartUp() Dim oMenuItem Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_TrackList, 0, 0) oMenuItem.Caption = "Test changes to SongData" oMenuItem.OnClickFunc = "Test" oMenuItem.UseScript = Script.ScriptPath End Sub Sub Test(oMenuItem) Dim oSongData Dim oTempData Set oSongData = SDB.SelectedSongList.Item(0) Set oTempData = oSongData.GetCopy oSongData.Comment = "Zvezdan" SDB.MessageBox oSongData.Comment, mtInformation, Array(mbOK) Set oSongData = oTempData SDB.MessageBox oSongData.Comment, mtInformation, Array(mbOK) End Sub Please select some test file in the tracklist, make the Comment column visible and choose Test changes to SongData from the pop-up menu. You would get two message boxes, first will display "Zvezdan" and the second will display the old comment, as they should. However, when you close those two message boxes, you would get displayed "Zvezdan" in the Comment column of the tracklist. Now, if your file is from some existing drive, after press on F5, the Comment field will display the old Comment text. However, if your drive is non-accessible, i.e. the test file is grayed, then it would left out with the text "Zvezdan" even after refresh (F5). None of that is wanted, especially not the second case with grayed tracks, because I have used the command Set oSongData = oTempData which should returns back the old SongData content and even the second message box reflects that. Please note that I haven't used oSongData.UpdateDB method at all. So, the question is: how could I reverse some changes to SongData object? If it is not currently possible, could you please add one new method to API, let say ISDBSongData::DiscardChanges? | ||||
Tags | No tags attached. | ||||
Fixed in build | 1653 | ||||