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
|