Re: adding file reference via applescript
Re: adding file reference via applescript
- Subject: Re: adding file reference via applescript
- From: Dmitry Markman <email@hidden>
- Date: Thu, 17 Nov 2005 16:18:17 -0500
thank you very much for your answer
your solution worked
but it's much-much slower (about 3 times slower):
so adding item into the group with path and type as relative to group is
significantly faster then adding item with full path property with either path type
so I decided to go back to workaround with closing/reopening project
adding item to the target is relatively fast
thanks again
On Thursday, November 17, 2005, at 03:03PM, Rick Ballard <email@hidden> wrote:
>
><<Original Attached>>
Dmitry Markman, PhD
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