• 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: Cocoa AppleScript: selection, inserting?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa AppleScript: selection, inserting?


  • Subject: Re: Cocoa AppleScript: selection, inserting?
  • From: Brian Webster <email@hidden>
  • Date: Fri, 12 Oct 2001 17:05:51 -0500

On Friday, October 12, 2001, at 02:46 PM, cocoa-dev-
email@hidden wrote:

In fact, even just getting the selection using

set theSelection to selection

yields the same error. Using this particular snippet with the Finder,
for example, works fine, TextEdit has the same error.

This is because neither Sketch nor TextEdit defines a selection object anywhere in their dictionaries.

Example 2:

Trying to insert text into a TextEdit document:

<snipped examples>

The following is from the release notes for Scripting under "Known Problems": (/Developer/Documentation/ReleaseNotes/Scripting.html)

Problem: The current implementation of the Text suite has performance problems and correctness problems.

Description: The Text suite is mostly supported, but it currently has some serious limitations. The main one is performance. There are several areas of the current implementation that are known to be totally inadequate performance-wise. Also, certain commands (especially Move, but including others as well) either won't work at all, or won't work as well as they should.

The text suite, since it is implemented entirely within the Scripting system, will be able to be fixed without your application ever having to change or be recompiled. A future release should address the performance and correctness problems with the current implementation.

In the meantime, your application should still expose NSTextStorage objects in its container hierarchy where it makes sense.

For now, we recommend avoiding working with large amounts of text through scripts.


--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster


  • Prev by Date: Fixed OS X 10.1 tools problem, thanks to all who helped out!
  • Next by Date: Re: Cocoa AppleScript: selection, inserting?
  • Previous by thread: Cocoa AppleScript: selection, inserting?
  • Next by thread: Re: Cocoa AppleScript: selection, inserting?
  • Index(es):
    • Date
    • Thread