• 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: adding file reference via applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding file reference via applescript


  • Subject: Re: adding file reference via applescript
  • From: Rick Ballard <email@hidden>
  • Date: Thu, 17 Nov 2005 12:03:41 -0800

On Nov 16, 2005, at 10:28 PM, Dmitry Markman wrote:

it looks like everything works with the following procedure

1. duplicate empty template project (so all target's properties are set)
2. set desirable name for the duplicate
3. add groups and files into the project (no additional rules about *.cpp/*.c files needed)
4. close the project
5. open the project again
6. add file references into the target

Steps 4 and 5 shouldn't be necessary. It appears that you've found a bug, however, where adding a file reference to a project via "path" instead of "full path" doesn't set the file kind appropriately until you close and re-open the project. You're actually specifying both a full path and a path, which is redundant; whichever you list last will be used, and since you list path last, path is used instead of full path.

If you make your new file reference and specify just the full path, the file kind will be set to sourcecode.cpp.cpp (for files ending in .cpp) without needing to close and re-open the project.

So replace your line:

set new_file to make new file reference with properties {file kind:"sourcecode.cpp.cpp", name:file_name, file encoding:macos roman, full path:full_file_path, path:file_name}

With something like this:

set new_file to make new file reference with properties {name:file_name, file encoding:macos roman, full path:full_file_path}

- 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

  • Follow-Ups:
    • Re: adding file reference via applescript
      • From: Dmitry Markman <email@hidden>
References: 
 >adding file reference via applescript (From: Dmitry Markman <email@hidden>)
 >Re: adding file reference via applescript (From: Rick Ballard <email@hidden>)
 >Re: adding file reference via applescript (From: Dmitry Markman <email@hidden>)

  • Prev by Date: Re: Watchpoints
  • Next by Date: XCode 2.2 & Perforce (Internal Error)
  • Previous by thread: Re: adding file reference via applescript
  • Next by thread: Re: adding file reference via applescript
  • Index(es):
    • Date
    • Thread