Re: parameter passing from cocoa to AS
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