• 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: Using AppleScript to access a Copy File Phase in an Xcode project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: another question related to the applescript in XCode 2.1
  • Next by Date: Re: application packaging?
  • Previous by thread: another question related to the applescript in XCode 2.1
  • Next by thread: Re: application packaging?
  • Index(es):
    • Date
    • Thread