adding file reference via applescript
adding file reference via applescript
- Subject: adding file reference via applescript
- From: Dmitry Markman <email@hidden>
- Date: Wed, 16 Nov 2005 11:53:03 -0500
Hi
I'm trying to add file reference to the group via applescript with the following command:
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}
properties name, full path and path were set successfully
but file kind and file encoding were not
all properties (except file encoding) marked as r/o in the XCode dictionary
(but I'm creating NEW file reference so I think I can provide those properties's initial values)
XCode dictionary has the following definition of the file encoding property:
"file encoding (iso 2022 japanese/iso latin 1/iso latin 2/Japanese EUC/macos roman/nextstep/nonlossy ascii/shift jis string/symbol string/unicode/utf8/windows cyrillic/windows greek/windows latin 1/windows latin 2/windows turkish) : ..."
that's why I use "macos roman" for file encoding property
XCode successfully creates and adds new file reference into the group with the right
name, full path and path properties, BUT file kind is always "file" and file encoding is undefined.
also: I can open that file from XCode by 2click on it,
but it doesn't not colorize c++ key words (because it doesn't have right kind I think)
thanks
Dmitry Markman
_______________________________________________
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