• 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
Re: 'kASAppleScriptSuite' undeclared
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'kASAppleScriptSuite' undeclared


  • Subject: Re: 'kASAppleScriptSuite' undeclared
  • From: Michael Tsai <email@hidden>
  • Date: Tue, 2 Oct 2007 15:08:24 -0400

On Oct 2, 2007, at 1:29 PM, Matt Neuburg wrote:

The method that you used is actually quite dangerous, especially when using
AppleScript; many of those literal four-character codes such as 'ascr' can
turn out to be incorrect on an Intel machine (though I do not know whether
that one, in particular, would turn out to be so). Linking to Carbon and
using the global name of the constant is the Right Way, and solves that
problem.

Importing the header is the right thing to do, but I think what he did was safe.


In this case, linking is unnecessary because it's a compile-time constant, not a global variable. Apple cannot change kASAppleScriptSuite to a different four-char code without breaking every app that uses it.

Four-char codes don't have endian problems so long as you treat them as numbers.

--Michael


_______________________________________________

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


References: 
 >Re: 'kASAppleScriptSuite' undeclared (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: NSCell subclass editing
  • Next by Date: fetchRequest doesn't give same result as filterPredicate
  • Previous by thread: Re: 'kASAppleScriptSuite' undeclared
  • Next by thread: Re: 'kASAppleScriptSuite' undeclared
  • Index(es):
    • Date
    • Thread