• 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: push/pop text item delimiters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: push/pop text item delimiters


  • Subject: Re: push/pop text item delimiters
  • From: Bill Briggs <email@hidden>
  • Date: Tue, 29 Jun 2004 22:31:34 -0300

At 1:36 AM +0100 30/06/2004, Nigel Garvey wrote:
I thought of this a few years ago, but was firmly sat upon when I
presented it here (or possibly on MACSCRPT). The thing is that the
AppleScript Language Guide states that multiple delimiters might be
implemented at some point in the future. That's why 'delimiters' is
plural and why the default setting's a list - for future expansion.

The old Scriptable Text Editor from years ago did support its own multiple TIDs, but only when getting the text items of a block of text. When reassembling the text it used the current delimiter from AppleScript itself. It was supposed to use the first one in its list, but I never found any syntax that made that work. The other odd thing is that AppleScript's TIDs can be a longish character string (not sure what the upper bound is, but it's many dozens), but Scriptable Text Editor's multiple TIDs support only allowed delimiters of 2 characters length. You could, for example, assign as follows:

tell application "Scriptable Text Editor" to set its text item delimiters to {";;;;", "::::", "~~~~"}

and when you asked for the TIDs you would get {";;", "::", "~~"} back. And that's all it used, the first two chars of each entry.


There's been no other sign that multiple delimiters ever will happen -
and it's not clear how they'd be interpreted if they were.

Possibly due to the "which one to use on reassembly" issue. Certainly it's not difficult to implement technically.


But if they ever should come into being, a script that uses the delimiter list as its own stack will start producing some very creative results!

That's for sure. Maintaining backward compatibility would be a definite problem if one were to accommodate the approach that started this thread.

- web
_______________________________________________
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:
    • Quark Making Rules Not So Easy
      • From: Jason Bourque <email@hidden>
References: 
 >Re: push/pop text item delimiters (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: push/pop text item delimiters
  • Next by Date: Quark Making Rules Not So Easy
  • Previous by thread: Re: push/pop text item delimiters
  • Next by thread: Quark Making Rules Not So Easy
  • Index(es):
    • Date
    • Thread