View Issue Details

IDProjectCategoryView StatusLast Update
0011115MMW v4Framework: Scripts/Extensionspublic2013-08-29 21:33
Reporterzvezdan Assigned To 
PriorityurgentSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version4.1 
Target Version4.1Fixed in Version4.1 
Summary0011115: Strange behavior of ISDBSongData object
DescriptionHere 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?
TagsNo tags attached.
Fixed in build1653

Relationships

related to 0011121 closedLudek ISDBSongData::Path = ... is moving file and changing Path property without UpdateDB (reverted) 
related to 0011226 closedLudek ISDBSongData::RenameByMask is moving file and changing Path property without UpdateDB 

Activities

peke

2013-08-03 22:37

developer   ~0037076

I can confirm this raising priority for triage

Ludek

2013-08-14 16:18

developer   ~0037154

Added the ISDBSongData::DiscardChanges method in build 1653.

peke

2013-08-17 00:13

developer   ~0037186

Verified 1653 Left for Zvezdan confirmation.

peke

2013-08-29 21:33

developer   ~0037373

Verified 1656