Ok, I believe I have the script correct, but now it's game over. Xcode crashes with:
2005-09-22 22:56:01 -0400
EXC_BAD_ACCESS (0x0001) KERN_INVALID_ADDRESS (0x0001) at 0x696c2f70
Thread 0 Crashed: 0 objc_msgSend_rtp + 24 1 CFArrayCreate + 456 2 NSAllMapTableValues + 188 3 -[PBXContainer(PBXContainerScripting) allItemsOfClass:] + 72 4 _NSGetUsingKeyValueGetter + 44 5 -[NSScriptObjectSpecifier objectsByEvaluatingWithContainers:] + 684 6 -[NSScriptObjectSpecifier objectsByEvaluatingSpecifier] + 316 7 -[NSScriptCommand evaluatedReceivers] + 96 8 -[NSScriptCommand executeCommand] + 76 9 -[NSScriptingAppleEventHandler handleCommandEvent:withReplyEvent:] + 272
I'll file a bug report but I don't think I can continue for now with this.
Thanks for the help everyone.
On Sep 22, 2005, at 9:27 PM, Dave McCaldon wrote:
Ok, it looks like Xcode is really picky about the syntax (or it could be my AppleScript naivety!). So, here's how I create the alias from the file reference:
set aRef to (full path of aFile) as POSIX file set aAlias to aRef as alias
If I do this:
add aAlias to aCopy of target aTarget
I get this error:
Xcode got an error: Can't make aCopy of target (target id "902F729A05417B7700353415" of project "Test") into type location reference.
But if I do this:
add aAlias to aCopy
It *seems* to be working, although I need to do more testing. I am slightly concerned that when I create the POSIX reference aRef, I don't seem to be able to use "project relative path", only full path works, so I hope that when I save the project, it doesn't end up with fixed file references, anyway, I can play with this some more.
Thanks for all the help!!!! I'll post the working script when I am done!
|