Re: Using AppleScript to access a Copy File Phase in an Xcode project
Re: Using AppleScript to access a Copy File Phase in an Xcode project
- Subject: Re: Using AppleScript to access a Copy File Phase in an Xcode project
- From: Dave McCaldon <email@hidden>
- Date: Sat, 1 Oct 2005 11:29:56 -0400
Fantastic, this is great!. This solved the problem and my script now works perfectly!
A big thank you to Rick, Scott, Gouri, Daniel and anyone else who has helped me out with this!
On Sep 29, 2005, at 12:35 AM, Rick Ballard wrote: It turns out that this is a bug in Cocoa scripting; thank you for reporting this. The problem occurs with statements like "add aFile to item 1 of copy files phases of aTarget", but not with statements like "add aFile to copy files phase 1 of aTarget", even though the statements should be equivalent.
"repeat with aCopy in every copy files phase of aTarget" sets aCopy to be equal to "item x of every copy files phase of aTarget" instead of "copy files phase x of aTarget", so you're encountering the same problem with the repeat loop in your _locateCopyPhase() handler. Until this bug is fixed, you can work around the problem by rewriting your repeat loop like so:
repeat with copyIndex from 1 to count of copy files phases of aTarget set aCopy to copy files phase copyIndex of aTarg if ((destination directory of aCopy) is equal to wrapper) and ((path of aCopy) is equal to ("Headers/" & aDir)) then return aCopy end if end repeat
- Rick
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden