I'm trying to populate an NSPopUpButton with an array of ITunesPlaylist objects. I got the NSArrayController bind to NSPopUpButton
app = SBApplication.applicationWithBundleIdentifier("com.apple.iTunes")
playlists = app.sources.objectWithName("Library").userPlaylists
myArrayController.setContent playlists
All the playlists will appear in the NSPopUpButton but they all have names with
<ITunesUserPlaylist:0x4018a5000: iTunesUserPlaylist 0 of iTunes Source "Library" of Application "iTunes" (51822)>
What I want to do is bind ITunesPlaylist.name to the content value of the NSPopUpButton, but I can't seem to get it to work.
There also seem to be very little documentation on class definitions of objects returned by Scripting Bridge API calls (e.g. ITunesPlaylist, ITunesTrack).
Can someone give me some pointers? Ultimately I'd like to make an drop-down menu that shows the user's iTunes playlist in hierarchal form.