ISDBPlaylist::Title is read-only, well, not exactly

Beta Testing for Windows Products and plugins

Moderator: Gurus

ZvezdanD
Posts: 3262
Joined: Thu Jun 08, 2006 7:40 pm

ISDBPlaylist::Title is read-only, well, not exactly

Post by ZvezdanD »

http://www.mediamonkey.com/wiki/index.p ... ist::Title:
Property Get/Let Title As String
Actually, the Title property is read/write indeed, but when I try to change a name of some playlist using scripts, nothing is happening. Here is a test script, you should first create one playlist named "Playlist example" and click on the Edit / Title Test option:

Code: Select all

Option Explicit

Sub OnStartUp()
    Dim mnuTest

    Set mnuTest = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0)
    mnuTest.Caption = "Title Test"
    mnuTest.OnClickFunc = "TitleTest"
    mnuTest.UseScript = Script.ScriptPath
End Sub

Sub TitleTest(Item)
    Dim oPlaylist

    Set oPlaylist = SDB.PlaylistByTitle("Playlist example")
    SDB.MessageBox oPlaylist.Title, mtInformation, Array(mbOK)
    oPlaylist.Title = "Blah blah"
    SDB.MessageBox oPlaylist.Title, mtInformation, Array(mbOK)
    Set oPlaylist = Nothing
    Set oPlaylist = SDB.PlaylistByTitle("Playlist example")
    SDB.MessageBox oPlaylist.Title, mtInformation, Array(mbOK)
End Sub
I need to use SQL command and to change node.Caption instead:

Code: Select all

    SDB.Database.ExecSQL "UPDATE Playlists SET PlaylistName = 'Blah blah' WHERE IDPlaylist = " & oPlaylist.ID
Well, it is not complicated to use that SQL, but it is complicated to find the corresponding node and change its caption. It is possible and I am doing that in my script, but it is unnecessary complicated.

One related question. Why playlist nodes cannot generate any event? I need at least OnNodeEditText, OnNodeEdited and OnCanEditNode.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Ludek
Posts: 5021
Joined: Fri Mar 09, 2007 9:00 am

Re: ISDBPlaylist::Title is read-only, well, not exactly

Post by Ludek »

Yes, it really seems to be bug, entered as http://www.ventismedia.com/mantis/view.php?id=5943 and fixed in build 3.1.2.1267.
ZvezdanD
Posts: 3262
Joined: Thu Jun 08, 2006 7:40 pm

Re: ISDBPlaylist::Title is read-only, well, not exactly

Post by ZvezdanD »

Ludek wrote:Yes, it really seems to be bug, entered as http://www.ventismedia.com/mantis/view.php?id=5943 and fixed in build 3.1.2.1267.
Thanks. How about question with events? I need to know when some user is going to change a title of playlist manually (F2/Rename).
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
Post Reply