4D v14.3MAP FILE TYPES |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
MAP FILE TYPES
MAP FILE TYPES
MAP FILE TYPES lets you associate a Windows file extension with a Macintosh file type. You need to call this routine only once to establish a mapping for an entire worksession with a database. Once the call has been made, the commands Create document, Append document, and Open resource file while running on Windows will automatically substitute the Windows file extension for the Macintosh file type you actually pass as a parameter to the routine. In the macOS parameter you pass a 4-character Macintosh file type. If you do not pass a 4-character string, the command does nothing and generates an error. In the windows parameter you pass a 1- to X-character Windows file extension. If you do not pass a 1 to 3-character string, the command does nothing and generates an error. In the context parameter you pass the string that will be displayed in the List Files of Type drop-down list of the Windows Open File dialog box. The context string is limited to 32 characters; additional characters are ignored. IMPORTANT: Once you have mapped a Windows file extension to a Macintosh file type, you cannot change or delete this mapping within a single work session. If you need to change a mapping while developing and debugging a 4D application, reopen the database and remap the file extension. The following line of 4D code (that could be part of the Startup database method) maps the Macintosh MS-Word file type “WDBN” to the Windows file extension “.DOC”: MAP FILE TYPES("WDBN";"DOC";"Word documents") Once the call above has been made, the following code will display only Word documents in the Open file dialog on Windows and Macintosh: $DocRef:=Open document("";"WDBN") |
PROPERTIES
Product: 4D
HISTORY
Created: < 4D v6 SEE ALSO
Append document ARTICLE USAGE
4D Language Reference ( 4D v14 R3) Inherited from : MAP FILE TYPES ( 4D v11 SQL Release 6) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||