• 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: Get only the name of the file, instead of the whole path!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get only the name of the file, instead of the whole path!


  • Subject: Re: Get only the name of the file, instead of the whole path!
  • From: Ed Stockly <email@hidden>
  • Date: Thu, 17 Jan 2008 07:49:28 -0800

you forgot to reset the AppleScript's text item delimiters to its original value, this may give very odd results ;-)


 I always set TIDs just before I use them, so when I do get odd results I know it's something else.

>>>I really disagree.

That's ok. There is room for disagreement.

>>>If you set a TID value like the ":" used here, ir remains in use as far as you reset the original one so you may get oddities in parts of code which you can't imagine.

This is a topic that has discussed in detail on this list in years past. Some believe, that you should reset the TIDs to a default value after each use. Others believe they should be reset to the most recently used value after each use. (Particularly if they're used in handlers).

My preference is to set them before I use them, every time. If I'm using them in a handler, I will set/reset them to their most recent value.

I use them text item delimiters all the time and they never surprise me.

ES


=
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Get only the name of the file, instead of the whole path!
      • From: KOENIG Yvan <email@hidden>
  • Prev by Date: Re: Should I not have avoided Leopard?
  • Next by Date: AppleScript SQL Bridge
  • Previous by thread: Re: Get only the name of the file, instead of the whole path!
  • Next by thread: Re: Get only the name of the file, instead of the whole path!
  • Index(es):
    • Date
    • Thread