• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cannot solve these two problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cannot solve these two problems


  • Subject: Cannot solve these two problems
  • From: Brian Christmas <email@hidden>
  • Date: Sat, 09 Aug 2014 06:49:04 +1000

G'day scripters

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.

TIA

Regards

Santa


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




 _______________________________________________
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

  • Follow-Ups:
    • Re: Cannot solve these two problems
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Privileged helper tool?
  • Next by Date: Re: Privileged helper tool?
  • Previous by thread: Re: Privileged helper tool?
  • Next by thread: Re: Cannot solve these two problems
  • Index(es):
    • Date
    • Thread