Intel writes creator codes backwards!
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