• 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: Why doesn't this cause an error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why doesn't this cause an error?


  • Subject: Re: Why doesn't this cause an error?
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 24 Sep 2002 07:03:41 -0700

On 9/24/02 1:59 AM, "Mr Tea" <email@hidden> wrote:

>> Generally speaking, if you can find some other way of doing something other
>> than 'offset', do the other way.
>
> Because... ?

More often than not, you'll be using 'offset' as a search mechanism in a
repeat loop. Because it's an osax call, it's much slower than using any sort
of text item delimiter construction for searching, no matter how contorted.
Whereas using it once is fine, using it in a repeat loop 1000 times can take
up to a minute, say, rather than a split second.

In many circumstances, it will find something you don't particularly want if
you're not very careful, because it returns the first instance it finds even
if that is a partial. Often people are looking for whole word and don't
realize that if they ask for offset of "top" they're doing to get it
returned from "stopped". OK, you wouldn't do that, but there are many
situations where it's easy to miss.

--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Why doesn't this cause an error? (From: Mr Tea <email@hidden>)

  • Prev by Date: Shell Scripting
  • Next by Date: Re: Why doesn't this cause an error?
  • Previous by thread: Re: Why doesn't this cause an error?
  • Next by thread: Re: Why doesn't this cause an error?
  • Index(es):
    • Date
    • Thread