macos:The-finder
出自UXGuide.net
请帮助我们修订和更新本文的中文部分
本文的中文部分虽然取自官方最新中文版本,但与英文原版相比已落后了一年多,可能无法反映英文版本中最近的修改,且文中笔误、前后译法矛盾、未翻译完全的片断较多,请您帮助一起修订完善。详情参见中文版修订完善计划。
Finder
The Finder
Here are some tips to help your application integrate well with the Finder:
下面是一些能够帮助您的程序更好的和Finder集成的技巧:
- Make sure your application bundle has a
.appextension. The Finder looks for this extension and treats your application appropriately when it finds it. The Finder also shows or hides this extension, depending on the state of the "Show all file extensions" preference in the Advanced pane of Finder preferences.
- 确保您的程序包是以
.app为后缀的。Finder会查找这个后缀并因此正确的处理您的程序,而且会根据Finder偏好设置中高级面板中“显示所有扩展名”的状态来显示或者隐藏这个扩展名。
- Package CFM applications in a bundle. Even if you develop using the CFM runtime, you can still take advantage of the bundle mechanism in Mac OS X.
- 将CFM程序打包。即使您使用CFM运行时系统来开发程序,您也可以利用Mac OS X中的程序包机制。
- Use an information property list to communicate information to the Finder. The information property list is the standard place to store information about your application and document types. For information on what to put in this file, see Runtime Configuration Guidelines.
- 使用信息属性表单来向Finder提供信息。信息属性表单是程序信息以及支持的文档类型标准的存放位置。更多信息清参考运行时系统配置指南。
- When saving files of your own document types, be sure to give them appropriate filename extensions to ensure platform interoperability and to support the Mac OS X user experience. You can also set a file type and optionally a creator type for a file. The file and creator type codes are not strictly necessary, but they do ensure interoperability with applications in the Classic environment. See File System Overview for more information about filename extensions, file types, and creator types.
- 将文档保存成私有的文档格式时,请确保附加了合适的扩展文件名以提供平台间的互操作性,支持Mac OS X的用户体验。 您也可以设置文件类型和可选的创建者类型,这并不是必须的,但是他们能够保证和老的Mac OS平台之间的互操作性。关于文件扩展名,文件类型和创建者类型的更多信息,请参考文件系统概述。
- Avoid changing the creator type of existing documents. The creator type implies a distinct sense of ownership over a file. Your application can assign a creator type for files it creates but it is not appropriate to change creator types for documents created by other applications without the user's explicit consent. The user can still associate files with a specific application through the Info window.
- 避免改变现存文档的创建者类型。创建者类型暗示了文件的所有权。您的程序可以给自己创建的文件附加一个创建者类型,但是不应该更改私自别的程序创建的文档的创建者类型。用户仍然能够通过属性窗口将该文件关联到其他应用程序。
- If your application produces documents in content types other than HTML, RTF, plain text, TIFF, PNG, JPEG, PDF, and QuickTime movies, you should include a Quick Look generator to convert your native document format into a format the Finder can display in Cover Flow view and a Quick Look preview. See Quick Look Programming Guide to learn how to do this.