Re: problem w/ text item delimiters
Re: problem w/ text item delimiters
- Subject: Re: problem w/ text item delimiters
- From: "Stockly, Ed" <email@hidden>
- Date: Tue, 6 Feb 2007 12:25:16 -0800
Once mastered, Text Item Delimiters are a very powerful and efficient tool, particularly useful for building text with markups.
> > a) you want a list
>
> >> so i can use that nifty text item delimiters trick to avoid having to put
> >> newlines everywhere;-)
>
Makes perfect sense.
>>>>HTML does not require _any_ new lines to display. You do not need any of these for building an HTML 'stream'.
Sure's it's not required, but it may be desired or preferred for any number of perfectly legitimate reasons.
> > b) you need to "count" parts of a page of markup
>
> >>debug
>
>>>Not efficient, not useful, a waste of time. How is counting how many "chunks" of unknown stuff you have related to debugging?
Again, a perfectly reasonable method for debugging if you're not using Script Debugger or another script editor that allows directly viewing variables. As for wasting time, few people would notice the ticks it takes to count an appleScript list.
> > c) you make a list and then say: set html to (html as string)
>
> >> so i can read
> >> the output to see wtf is f.u.;-)
>
>>>It's much easier (i.e., more human-like) to read a "chunk" of html, rather than a chunk of html split up by some arbitrary commas.
Setting the HTML to HTML as string doesn't have to split up text by commas. It can split the text using returns, double returns, returns and tabs, words, punctuation marks, any of which could be used make a particular string easier to read.
>>>>>From what I make of your replies, you have no real need or reason to use a list to build html, then turn around and cram it back into a string, than the simple fact that you went down a wrong turn when thinking through your project.
Totally disagree. You're very close to mastering text item delimiters, one of AppleScripts most powerful tools.
>>>In my own experience, this list is not an ideal source for actually learning the mechanics of writing compiled AppleScript.
Well, it should be. I never would have learned AppleScript had it not been for the support of experts here and, before this list was up, the Mac Scripters digest.
>>>That is to say that, while the experts of all experts are here, there are more efficient ways to learn to "code" (Matt N.'s book, for example). Coding stuff can always be at hand, like a desk dictionary, or thesaurus, for example.
Not everyone follows the same path or has the same needs when learning. The "experts of all experts" on this list should do a lot more to make new scripters feel supported and welcome. It's in all of our best interest.
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/mailman//archives/applescript-users
This email sent to email@hidden