TOPIC The 'obsolete' keywords in the Finder's AppleScript Dictionary are no longer present. Has this compatibility feature been removed? DISCUSSION Structural changes in the Finder between System 7 and Mac OS 8 required special script coding to maintain compatibility for the "locked", "file type", "creation date", "modification date", and "folder" properties of an item. The word 'obsolete' was placed after these properties in scripts written within Mac OS 8 in order to have them work with the System 7.x Finder. The terminology in the Mac OS 8.0 and Mac OS 8.1 Finder dictionary contained references to this technique. The 'obsolete' parameter is still usable with Mac OS 8.5. However, the Finder dictionary in Mac OS 8.5 no longer contains the 'obsolete' parameters. The following script is an example showing how to write AppleScripts for the Finder, accessing these properties, that are compatible across System 7.x and Mac OS 8.x. set SysFldrPath to path to system folder as text -- some item, here the System folder set SystemPath to SysFldrPath & "System" as text tell application "Finder" get the version -- of the Finder set FinderVersion to the result as text if FinderVersion is less than "8.0" then -- Pre Mac OS 8 get locked obsolete of SystemPath -- file property get file type obsolete of SystemPath -- file property get the creation date obsolete of alias SysFldrPath -- item property get the modification date obsolete of alias SysFldrPath -- item property else -- Mac OS 8 get locked obsolete of SystemPath -- file property get file type obsolete of SystemPath -- file property get the creation date of alias SysFldrPath -- item property get the modification date of alias SysFldrPath -- item property end if end tell |
Document Information | |
Product Area: | Mac OS System Software |
Category: | Mac OS 8.5 |
Sub Category: | System Software Components |
Copyright © 2000 Apple Computer, Inc. All rights reserved.