• 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
Intel writes creator codes backwards!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Intel writes creator codes backwards!


  • Subject: Intel writes creator codes backwards!
  • From: Harald E Brandt <email@hidden>
  • Date: Tue, 17 Oct 2006 21:39:07 +0200

Despite I think I have followed the list pretty well, I have not seen anyone report on the fact that System Events writes both creator codes and files types BACKWARDS on Intel-based Macs!?

tell application "System Events"
set file type of file afilePath to "TEXT"
set creator type of file afilePath to "PTAa"
end tell

Results in:
Creator: 'aATP'
Type: 'TXET'

(As retrieved by something like:
set info to (info for alias afilePath)
set Type to file type of info
set Creator to file creator of info
)

However, Finder does it correct:
tell application "Finder"
set file type of file afilePath to "TEXT"
set creator type of file afilePath to "PTAa"
end tell

That one gives the expected correct result.
Three questions arise:

1. I want an explanation as to why System Events does it backwards and why this bug (since it got to be a bug?) has not been corrected after so many versions of 10.4?

2. I assume that the issue has to do with big and little endian, but why does this only affect System Events?

3. Since this error has broken a commercial app that I sell, which is in use worldwide, I wonder: Is the use of System Events for the above purposes in some way deprecated? Or are creator/type codes going to be completely deprecated?


______heb____________________________
Harald E Brandt http://bragit.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Intel writes creator codes backwards!
      • From: Doug McNutt <email@hidden>
  • Prev by Date: Re: XCode 2.4 Affects "do shell script"?
  • Next by Date: re: Reported Size issue in PSCS2 (Oakley Masten)
  • Previous by thread: Re: Stubborn Folder Action remnants 2
  • Next by thread: Re: Intel writes creator codes backwards!
  • Index(es):
    • Date
    • Thread