Re: multi-line records?
Re: multi-line records?
- Subject: Re: multi-line records?
- From: "Stockly, Ed" <email@hidden>
- Date: Fri, 24 Feb 2017 18:35:23 +0000
- Thread-topic: multi-line records?
On Feb 23, 2017, at 10:18 PM, Mitchell L Model wrote:
This is probably naive, and I don't understand why I haven't run into it before, but I have a property whose value is a record with about a dozen entries with keys having 10-20 characters. (It's an error message dispatch table.). Even if I break this up
into one line per field with the line-continuation character compilation jams them all onto one unreadably long line. I have certainly run into many cases in the past where the compiler unbreaks my lines in strange ways, but this seems ridiculous. Is there
something I am missing here?
My solution is to put each field in its own record and concatenate them line by line. It doesn't look to bad, but it seems silly. Any better ideas?
I have run into the same situation. Are you doing this:
property zzz : {1, 2, 3} & ¬
{4, 5, 6} & ¬
{7, 8, 9}
If so, it doesn't seem much worse than just breaking up the lines with the continuation character. You are just adding an additional concatenation character.
The one I hate is the compiler munging up the handler calls. I haven't figured a way around that. For example, the aesthetically pleasing:
set resultDialogReply to display dialog "directParamText" ¬
default answer "defaultAnswerText" ¬
hidden answer false ¬
buttons {"one","two","three"} ¬
default button "one" ¬
cancel button "three" ¬
with title "withTitleText" ¬
with icon withIconValue ¬
giving up after givingUpAfterNumber
becomes this dog's breakfast:
set resultDialogReplyto
display dialog ¬
"directParamText"
default answer ¬
"defaultAnswerText"
hidden answer false ¬
buttons {"one", "two", "three"} ¬
default button ¬
"one"
cancel button ¬
"three"
with title ¬
"withTitleText"
with icon withIconValue ¬
giving up aftergivingUpAfterNumber
I haven't figured out a way around that.
Steve
------------------
OS X 10.6.8, AppleScript 2.1.2
|
_______________________________________________
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