PRB: Creator Type Not TEXT with FCREATE If Extension Not .TXTID: Q130006 2.60a 3.00b MACINTOSH kbprg kbprb The information in this article applies to:
SYMPTOMSThe FCREATE() low level file function is used to create a text file that doesn't have a file extension of .TXT. The Icon for the text file is just a document, not a document with a FoxPro head on it. Get Info on the file shows that it is a FoxPro file however. If the file is opened in a resource editor, such as ResEdit, the Creator is FOXX but the Type is ????. If the text file is created with a file extension of .TXT, it will have an icon of a document with a FoxPro head on it. A resource editor will show the Type as TEXT. Customers have reported that not having a Type of TEXT has been known to cause problems with certain software packages that use the text file.
CAUSEFoxPro for Macintosh looks at file extensions when assigning Creator Types to files. The .TXT extension along with the .FPM extension on the CONFIG.FPM file are the only file extensions that get assigned a Creator Type of TEXT. See page 402 of the Microsoft FoxPro for Macintosh "Developer's Guide" for a listing of File Types and Extensions. If you have Visual FoxPro for Macintosh version 3.0, search for File Extensions in the on-line Help.
WORKAROUNDCreate the text file with a .TXT file extension, and then use the RENAME command to change the extension. See the sample code in the "Steps to Reproduce Behavior" section of this article.
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior1. Put the following code in a new program file and run it.
2. Go to Finder and look at the icon of test.xxx. It should just be a
3. Put the following code in a new program file and run it.
4. Go to Finder and look at the icon of test.xxx. It should now be a
Note that the FxSetType() function in the FOXTOOLS.MLB (FOXTOOLS.CFM or
FOXTOOLS.SLM with Visual FoxPro for Macintosh) library will not change the
creator type to TEXT.
Rebuilding the desktop on the Macintosh should not undo the Type after the file extension is changed with the RENAME command. However, it may be a good idea to avoid doing this until the text file has been used for its purpose. Additional reference words: vFoxMac 3.00b FoxMac 2.60a KBCategory: kbprg kbprb KBSubcategory: FxprgGeneral
|
Last Reviewed: May 24, 1996 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |