• 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: Error geetting offset of char in errMsg
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error geetting offset of char in errMsg


  • Subject: Re: Error geetting offset of char in errMsg
  • From: Christopher Nebel <email@hidden>
  • Date: Thu, 14 Jun 2001 11:56:08 -0700

On Thursday, June 14, 2001, at 04:17 AM, Nigel Garvey wrote:

Shane Stanley wrote on Thu, 14 Jun 2001 09:02:35 +1000:

On 14/6/01 2:24 AM +1000, Nigel Garvey, email@hidden, wrote:

It was just a fast way that Jeff Baumann (I think) discovered to convert
styled text into plain text. Obviously it would obviously be nicer if
there were a more direct coercion.

So styled text is a sort of subclass of string?

I think so, as far as AppleScript itself is concerned - but not for OSAX
commands such as 'the clipboard and 'offset'. Presumably this is simply
because the OSAXen weren't written by the same people.

AppleScript itself doesn't make any real distinction between styled and unstyled text. Internally, strings are always styled, but most of them happen to only have the default style. Unicode text doesn't carry any style information, ever, so that's why the back-and-forth coercion strips off the styles.

In an application or scripting addition, you can ask for a parameter as plain text or styled text, and you'll get the appropriate thing: it will strip off the styles or fabricate them as necessary. The ironic thing about "offset of" (which was written by a guy on the AppleScript team, though "the clipboard" wasn't) is that it deliberately asks for styled text, and has a lot of code to deal with it, but it's wrong. This will be fixed in a future version.


--Chris Nebel
AppleScript Engineering


References: 
 >Re: Error geetting offset of char in errMsg (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: How to 'load' osaxen
  • Next by Date: RE: applescript-users digest, Vol 2 #760 - 15 msgs
  • Previous by thread: Re: Error geetting offset of char in errMsg
  • Next by thread: Re: Error geetting offset of char in errMsg
  • Index(es):
    • Date
    • Thread