Mac OS X and file type/creator

Karl Becker karl at karlbecker.com
Sun Jun 22 02:35:01 EDT 2003


I made a program for Classic quite some time ago, and I set up a BNDL 
in it so files with a creator code of NTTX and a file type of NTTX (and 
maybe other file types, too) would use a custom icon from my 
application.

I know how to edit a package's plist and ico files to display 
application-defined icons in Mac OS X on files with specific file 
extensions (I only know how to make one file extensions be associated 
with each application from the Sons of Thunder website).  So I did 
this, so I could have .ntx files show the custom icon.

However, when I did this, all my old NTTX/NTTX file/creator coded files 
show the nice new OS X custom icon, too.  So I try to use the fileType 
property to save files with my Mac OS X application as NTTXNTTX files, 
but when I check the file/creator type with ResEdit, the file type and 
creator code are empty, or four spaces.

What could be wrong?!  Is this a bug?
If MetaCard's Mac OS X engine is simply not setting file type and 
creator codes... could this not be fixed to let us get around using 
extensions in files?  And is there anyway to hide extensions on a file 
created in MetaCard?

Here's an actual script snippet:
-- I earlier put "NTTXNTTX" into fileTypeString
-- now I actually write the file, and I surrounded it with fileType 
settings,
--   just in case it matters when you set the fileType... it does not
--   appear to make any difference, though
   set the fileType to fileTypeString
   open file theFP for write
   set the fileType to fileTypeString
   write theFileBody to file theFP
   close file theFP




More information about the metacard mailing list