• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problems with speed & issues with coercion in OS 9.2.2 (AppleScript 1.7)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with speed & issues with coercion in OS 9.2.2 (AppleScript 1.7)


  • Subject: Problems with speed & issues with coercion in OS 9.2.2 (AppleScript 1.7)
  • From: email@hidden
  • Date: Mon, 28 Jan 2002 12:21:18 EST

Still running into issues with freezing under 9.2.2 (AppleScript 1.7) when
trying to pull file information in a handler. I think I might have stumbled
across an explanation in one of the knowledge base (Article ID 75207) from
Apple's website:

All Mac OS Extended ("HFS Plus") format disks can store files with file names
in Unicode text and longer than 32 characters. When older software accesses
such files, those names are represented in an encoded form (with something
like "#28AF" in the name). With AppleScript 1.6 and earlier, the results of
many Standard Additions commands (like path to, info for, and list folder),
as well as creation and display of alias and file objects, required and
returned encoded names. In AppleScript 1.7, all file names are represented as
Unicode text. Encoded file names are no longer supported. Note that the
Finder in Mac OS 9 only supports encoded names, but the Finder in Mac OS X
and Classic only supports long names.

The following script example will work fine when pointed at a folder, but
causes a freeze when pointed at a file (using the variation choose file
instead of choose folder):

tell application "Finder"

choose folder "Please select the folder to do filename conversions onb&"

--response should be alias to the file/folder, but force it to be an
alias anyway
set FolderPathChoosen to (result) as alias

my IsFolder(FolderPathChoosen)

display dialog the result as string

end tell
--
--------------+----------------+----------------+----------------+------------

----+
-- HANDLER b IsFolder
-- Expected Input: Alias of path&filename
-- Returns Output: Boolean, TRUE or FALSE
--
--------------+----------------+----------------+----------------+------------

----+

local ValueForReturn
local TheRecordConents

on IsFolder(FullItemPathAndName)
-- gets passed datatype alias

set ValueForReturn to folder of (info for FullItemPathAndName)
return ValueForReturn

end IsFolder


  • Follow-Ups:
    • Re: Problems with speed & issues with coercion in OS 9.2.2 (AppleScript 1.7)
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Speed of applets vs. compiled scripts
  • Next by Date: Re: Speed of applets vs. compiled scripts
  • Previous by thread: Re: Problems with speed & issues with coercion in OS 9.2.2 (AppleScript 1.7)
  • Next by thread: Re: Problems with speed & issues with coercion in OS 9.2.2 (AppleScript 1.7)
  • Index(es):
    • Date
    • Thread