• 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 save text item delimiters? Philosophical question....
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why save text item delimiters? Philosophical question....


  • Subject: Re: Why save text item delimiters? Philosophical question....
  • From: Jon Pugh <email@hidden>
  • Date: Mon, 16 Jun 2003 21:00:15 -0700

At 10:03 AM -0400 6/16/03, Paul Skinner wrote:
> While there has been great debate in the past as to the value of this store/reset practice. It comes down to this simple fact...
>
>There are cases where not restoring them will cause problems in your code. There are NO cases where storing/restoring will cause problems in your code.
>
> If you store and restore the TIDs nothing bad will come of it. If you don't store and restore them then USUALLY nothing bad will come of it, given proper diligence to set immediately before using them. There are cases, however, where you cannot set the TIDs immediately before you use them.
> You need examples?

Don't forget the popular implicit string coercion which uses the text item delimiters, that's the one that always bites people who forget to set them back.

set text item delimiters to space
set moof to "m o o f"
set foom to reverse of text items of moof
set foom1 to foom as string
set text item delimiters to {}
{foom, foom1, foom as string}

Jon
_______________________________________________
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.

  • Follow-Ups:
    • Re: Why save text item delimiters? Philosophical question....
      • From: John Delacour <email@hidden>
References: 
 >Re: Why save text item delimiters? Philosophical question.... (From: Paul Skinner <email@hidden>)

  • Prev by Date: capturing username, password and # of pages when printing...
  • Next by Date: Re: capturing username, password and # of pages when printing...
  • Previous by thread: Script to save and restore a session in TextEdit
  • Next by thread: Re: Why save text item delimiters? Philosophical question....
  • Index(es):
    • Date
    • Thread