AppleScript "file type" becomes "file kind" when compiled in Xcode
AppleScript "file type" becomes "file kind" when compiled in Xcode
- Subject: AppleScript "file type" becomes "file kind" when compiled in Xcode
- From: Mark Douma <email@hidden>
- Date: Sun, 29 Feb 2004 06:37:20 -0500
Anyone else experiencing this one? I'm using Xcode 1.1, OS X 10.3.2.
I'm trying to examine each file in a list of files for a certain
creator code and file type--namely that of font suitcases: creator code
of 'DMOV' and file type of 'FFIL'.
Code that works fine in Script Editor runs into problems when moved
over to Xcode. I'd prefer not to use the Finder if I don't have to, and
the "info for" part of the standard scripting additions seems to work
in Script Editor. When I paste the following code into Xcode, though,
file *type* is automatically changed to file *kind*. Saving this and
then building the app will cause an (obvious) AppleScript error when
running the application, since there's no such thing as "file kind" for
an "info for" record. Or am I structuring this "info for" thing wrong?
on process_fonts_(fonts_)
set total_count_ to count of fonts_
repeat with i from 1 to the total_count_
set font_ to (item i of fonts_)
set font_info_ to info for font_
if ((alias of font_info_ is false) and (file type of font_info_ is
"FFIL") and (file creator of font_info_ is "DMOV")) then
set POSIX_font_path_ to POSIX path of font_ as string
set sh_grep_sfnt_ to "grep -c sfnt \"" & POSIX_font_path_ &
"/..namedfork/rsrc\""
-- and more.....
end if
end repeat
end process_fonts_
Okay, this is gotta be a bug.
If I replace "file type" with "+class asty;" and then compile, it works
correctly-- Xcode shows "file type"!
If I then try to save the script, or compile again (without making any
changes whatsoever), "file type" changes, once again, to "file kind".
This is ridiculous. Every time I need to build my app, I have to first
replace all instances of "file kind" with "+class asty;" and then
immediately Save the script file. If I were to try compiling it first
(checking for any errors), and then hit Save, that apparently counts as
2 compiling instances and I'm right back to where I started with with
"file kind".
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.