• 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: Thu, 22 Sep 2005 22:59:00 -0400


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!


 _______________________________________________
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

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>)

  • Prev by Date: SIGBUS when I set a breakpoint
  • Next by Date: Re: Using AppleScript to access a Copy File Phase in an Xcode project
  • 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