• 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: Tue, 27 Sep 2005 12:09:14 -0400


I'm definitely adding the file to the Copy Files phase:

    add item 10 of every file reference of project "Test" to item 4 of every copy files phase of target id "902F729A05417B7700353415" of project "Test"
        "Xcode got an error: Target container does not support the add event."

My logic works like this:

    * For each header in the project: e.g. utilities/foo/bar.h
    * Determine which directory it's in: "utilities/foo"
    * Look for a Copy Files phase that has:
        - a directory of "wrapper"
        - a path that matches the directory for the header (e.g. utilities/foo)
    * If not found:
        - Create a new Copy Files phase for this directory
    * Now add the file to the new/existing Copy Files phase


It seems that the Add File works if I had just created the Copy Files phase object, but if I get the Copy Files phase by looking through the phases in the Target for one that matches the header directory, I don't seem to be able to add to that object (I get the "does not support the add event").

It's wierd, it's almost as if I've either got the wrong object (but the event log shows it as {item 4 of every copy files phase of target id "902F729A05417B7700353415" of project "Test"}), or as if the items were "read only".

Thanks.



On Sep 27, 2005, at 11:42 AM, Gouri Jonnalagadda wrote:


On Sep 27, 2005, at 6:50 AM, Dave McCaldon wrote:



Is there something that would cause me to get "Target container does not support the add event" when retrieving a Copy Files phase from the target vs. creating a new instance of one (which doesn't seem to give me the error).


If you are trying to add a file reference to a target instead of a build phase, then you are likely to get this error.  You can add items only to a build phase but not to a target directly. Targets do not support the add event.



Also, does anyone know of a way to "introspect" the available events/methods of an arbitrary AppleScript object?

Thanks.





Gouri



 _______________________________________________
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

  • Follow-Ups:
    • Re: Using AppleScript to access a Copy File Phase in an Xcode project
      • From: Scott Tooker <email@hidden>
References: 
 >Using AppleScript to access a Copy File Phase in an Xcode project (From: Dave McCaldon <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Daniel Jalkut <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Dave McCaldon <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Gouri jonnalagadda <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Dave McCaldon <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Dave McCaldon <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Gouri jonnalagadda <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Dave McCaldon <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Daniel Jalkut <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Dave McCaldon <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Daniel Jalkut <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Rick Ballard <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Dave McCaldon <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Dave McCaldon <email@hidden>)
 >Re: Using AppleScript to access a Copy File Phase in an Xcode project (From: Gouri Jonnalagadda <email@hidden>)

  • Prev by Date: Re: Using AppleScript to access a Copy File Phase in an Xcode project
  • Next by Date: Version Linking Issues
  • Previous by thread: Re: Using AppleScript to access a Copy File Phase in an Xcode project
  • Next by thread: Re: Using AppleScript to access a Copy File Phase in an Xcode project
  • Index(es):
    • Date
    • Thread