How to add tracks to a iTunes playlist?
How to add tracks to a iTunes playlist?
- Subject: How to add tracks to a iTunes playlist?
- From: Kyle Sanders <email@hidden>
- Date: Sun, 15 Nov 2009 19:23:30 +0100
Hi dear all,
I'm struggeling with the following problem. I just can't figure out how to add tracks to an existing iTunes playlist using the Scripting Bridge Framework.
The iTunesPlaylist class has a SBElementArray named
tracks, which consists of all of the tracks in this playlist. I can remove these tracks from the list without any problems. For example the method
removeLastObject deletes the last track from the playlist, but I can't figure out how to ADD new tracks.
If I try to add them like I add an object to an Array (addObject, insertObject:atIndex:) I get the error:
"
*** -[SBElementArray addObject:]: can't add an object that already exists".
I also tried to use the
'add' function of the iTunes object, however it produces an Exception with the error number -1700
I'm totally frustrated because there is no reference or any documentation on the headers generated for the Scripting Bridge and need help!
So, how one supposed to add new tracks (objects of type iTunesTrack) to a playlist (object of type iTunesPlaylist)?
Thanks for any help in advance!
Regards,
Kyle Sanders
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden