Re: 'kASAppleScriptSuite' undeclared
Re: 'kASAppleScriptSuite' undeclared
- Subject: Re: 'kASAppleScriptSuite' undeclared
- From: Matt Neuburg <email@hidden>
- Date: Wed, 03 Oct 2007 09:21:22 -0700
- Thread-topic: 'kASAppleScriptSuite' undeclared
On or about 10/3/07 8:51 AM, thus spake "Michael Tsai" <email@hidden>:
> On Oct 3, 2007, at 11:27 AM, Matt Neuburg wrote:
>
>>> Four-char codes don't have endian problems so long as you treat them
>>> as numbers.
>>
>> You might be using the phrase "treat them as numbers" in some way
>> that is
>> unknown to me. I can certainly attest from experience that code
>> that treats
>> four-char codes as four-char codes (i.e. a literal in single-
>> quotes) can
>> have endian problems.
>
> A four-char code literal is just another way to type an integer, like
> using hex notation. You can type it in your code, assign it to a
> variable, pass it as a parameter, etc. The endianness only matters if
> you try to treat it as something other than a number, e.g. if you
> stuff it into a char[] or NSData. And in those cases the issues would
> be the same whether you used kASAppleScriptSuite or 'ascr'--or, for
> that matter, NSMacOSRomanStringEncoding or 30.
That is certainly true! I'm just saying that this is a trap lying in wait.
Something that worked under the Old Regime might break on an Intel machine.
Just to give an example close to my heart, the entirety of the Apple
event-related code for Frontier (about which I once wrote a book,
http://pages.sbcglobal.net/mattneub/frontierDef/ch00.html) lies broken and
panting on the ground, if you try to run the universal binary as a native
Intel app on an Intel machine. (Of course you can work around this by
running it under Rosetta.)
<http://sourceforge.net/tracker/index.php?func=detail&aid=1804842&group_id=1
20666&atid=687798>
m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, http://tinyurl.com/2ouo3b
Take Control of Customizing Tiger, http://tinyurl.com/33ad5s
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden