• 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
Re: parameter passing from cocoa to AS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parameter passing from cocoa to AS


  • Subject: Re: parameter passing from cocoa to AS
  • From: Nir Soffer <email@hidden>
  • Date: Thu, 13 Jul 2006 23:31:03 +0300


On 13/07/2006, at 21:30, Philip Lukidis wrote:

[long confusing hard to read code]

The first problem is this:

tell application "iTunes"
	tell every track of library playlist 1
		copy container to track_name
	end tell
end tell

returns  a list with of references to playlist1

{library playlist id 84 of source id 40, library playlist id 84 of source id 40, library playlist id 84 of source id 40, library playlist id 84 of source id 40, library playlist id 84 of source id 40, library playlist id 84 of source id 40, library ...


What you probably wanted is:

tell application "iTunes"
	return tracks of library playlist 1
end tell

Which is a list of tracks inside playlist 1

{file track id 101 of library playlist id 84 of source id 40, file track id 100 of library playlist id 84 of source id 40, file track id 98 of library playlist id 84 of source id 40, file track id 96 of library playlist id 84 of source id 40, file track id ...


I can't ignore this highly confusing code:

	tell every track of library playlist 1
		copy container to track_name
	end tell

1. it should return something, but you never return anything, the reader has to guess
2. variable holding a list of tracks called track_name?!




Nir Soffer

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >parameter passing from cocoa to AS (From: "Philip Lukidis" <email@hidden>)

  • Prev by Date: Re: initializers in Categories?
  • Next by Date: RE: parameter passing from cocoa to AS
  • Previous by thread: parameter passing from cocoa to AS
  • Next by thread: RE: parameter passing from cocoa to AS
  • Index(es):
    • Date
    • Thread