Using Xcode 5.1 on 27" i7 iMac.
I've spent two days struggling with two problems.
The first is I cannot get the Columns menu to show when I have a table selected in interface builder, and cannot change the column number or column settings. Shanes book makes it look as though it should show easily, but even when dragging a new table into my project, it's a no-show. I've definitely got the table selected. The only options I get in the Attributes inspector are Control & View. The top shows 'Table View'. I'm wondering if my preferences need trashing.
The second is a none-working setDoubleAction_ I've been through Shanes book for the umpteenth time, and followed it to the letter, but the routine "selectNewPlaylist_" is not being called. Double clicking on the columns set in setUpPlaylistsToChooseFromList is doing nothing. I've also tried the tell statements with and without the 'my'.
I would appreciate any thoughts as to why these are happening.
script AppDelegate
property parent : class "NSObject"
property NSUserDefaults : class "NSUserDefaults"
property |window| : missing value
property thePlayListData : {}
property PlaylistsToChoosefromArrayController : missing value
property mainPlaylistTable : missing value
property countOfPlaylistToChooseFrom : {}
property playlistToChooseFromData : {}
property SelectedPlaylistsArrayController : missing value
property chosenPlaylistTable : missing value
property selectedPlayListsData : {}
property selectedPlaylistTrackList : missing value
property selectedPlaylistTrackListTitle : missing value
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
set thePlayListData to current application's NSMutableArray's array()
tell current application's NSMutableArray to set thePlayListData to arrayWithCapacity_(1)
set selectedPlayListsData to current application's NSMutableArray's array()
tell current application's NSMutableArray to set selectedPlayListsData to arrayWithCapacity_(1)
my setUpPlaylistsToChooseFromList()
tell my mainPlaylistTable to setDoubleAction_("selectNewPlaylist_")
tell my chosenPlaylistTable to setDoubleAction_("listAllTheTracks_")
end applicationWillFinishLaunching_
on setUpPlaylistsToChooseFromList()
try
tell application "iTunes"
set ChooseFromPlayLists to name of playlists
set folderPlaylist to name of folder playlists
set my playlistToChooseFromData to {}
set my countOfPlaylistToChooseFrom to {}
#tell current application's NSMutableArray to set my thePlayListData to arrayWithCapacity_(1)
repeat with eachPlaylist in ChooseFromPlayLists
if eachPlaylist is not in folderPlaylist then
if eachPlaylist as text is not in {"Library", "Music", "Movies", "Podcasts", "Books", "Purchased"} and eachPlaylist does not contain "Purchased" and eachPlaylist is not in my playlistToChooseFromData then
set tempTrackCount to (count of tracks of playlist eachPlaylist) as integer
tell PlaylistsToChoosefromArrayController
my thePlayListData's addObject_({countOfPlaylistToChooseFrom:tempTrackCount, playlistToChooseFromData:eachPlaylist as text})
end tell
end if
end if
end repeat
set my thePlayListData to my thePlayListData
end tell
on error errmsg number errNum
display dialog errmsg & return & errNum
end try
tell PlaylistsToChoosefromArrayController to deselectAll_(chosenPlaylistTable)
end setUpPlaylistsToChooseFromList
on selectNewPlaylist_(sender)
set p to 0
say 1
try