Re: Recommendations for AppleScript Formatting
Re: Recommendations for AppleScript Formatting
- Subject: Re: Recommendations for AppleScript Formatting
- From: has <email@hidden>
- Date: Wed, 24 Oct 2001 19:13:56 +0100
Bill Cheeseman wrote:
>
Just to harp one more time on colorblindness issues: The federal government
>
now requires all federal Web sites to minimize their dependence on color as
>
a means to convey information, under the Americans with Disabilities Act
>
(ADA).
Out of interest, does the act say 'dependence on colour as _a_ means' or
'dependence on colour as _the sole_ means'? IMHO, the use of colour to
indicate function is fine (colour IS a good and useful tool in its own
right) - as long as it's backed up with a second means of indicating
function which isn't colour-dependent. But this seemed to suggest that you
shouldn't use colour for anything beyond cosmetics, period (which is daft).
The main complaint over websites has to be about links where a designer
removes the underline for appearance's sake but doesn't use some other
unique (and colour-independent) method to distinguish it from ordinary
text.
(Note: conversely, using underlines on non-link text isn't a good idea either.)
-----
Now... just to play devil's advocate for a moment, there is an important
difference between webpage links and applescript formatting:
Whereas links MUST be distinguishable in order to use the web, Applescripts
DON'T require formatting in order to be usable or readable - though
formatting can assist with the latter in some respects. So I am not
convinced that the same rules can or should be applied.
One example is this mailing list, of course, where scripts are posted all
the time. Another (from what I've seen, at least) are other computing
languages, which aren't too big on keyword formatting in the first place.
Therefore Applescript formatting is non-essential (meta)information - i.e.
it's not part of the script itself.
Further to that, how it looks entirely depends on individual user settings
- so even where it does appear it won't be 'consistent'.
-----
>
Even apart from colorblindness issues, making any distinctions "minute"
>
defeats the primary purpose of AppleScript formatting, which is to allow a
>
human reader to distinguish syntax elements at a glance.
In that particular case, it sounds like text formatting attributes are
being used to perform some non-standard tricks for one particular user.
Hardly sufficient reason for Apple to apply it as a standard, I think.:)
-----
I think there's two issues here:
1. What default formatting scheme - or schemes - should Script Editor ship
with?
2. What, if any, formatting should folk used when posting code to a shared
forum (eg a webpage) in which such formatting can be supported? (And just
how important is it anyway?)
With 1, I'm sure Chris and co. will play it sensibly...
And for those who don't like to use standard settings (which constitutes
the majority of computer users, imho;) you can always reconfigure your
preferences as you see fit. (i.e. What each person does in their own space
is their own business.)
In the case of 2, I'm not sure how much advantage there is in posting
scripts that are formatted in Times/Arial/bold/underline/red/blue/green
anyway. Given that we all seem to have adopted which ever scheme makes the
most sense to us, it's all going to look foreign regardless. When I find a
script that I want to look at w.r.t. keywords/variables/strings/etc, I
always copy and paste it into my editor and reformat it there.
One option might be to have an "export to html" button on the script editor
that applies a default formatting (that is accessible - in web terms - to
anyone, i.e. sensible fonts and font sizes in addition to any formatting
schemes).
Though (as I said above) formatting is non-essential, secondary info anyhow
and copy+paste+reformat is still simpler than trying to interpret somebody
else's colour scheme. Given the choice I'd rather see scripts posted
unformatted.
Therefore, regarding #2 - you will never please everyone... or even a
worthwhile majority. It may not even be worth trying.
-----
One other thought re posting online: Using <font> tags for formatting
fonts, colours, etc online is getting past it nowadays. Also, if CSS is
used you'd have the option** to view the page using your own stylesheet if
you preferred. (I'm sure writing an AS to generate a user stylesheet based
on AS formatting prefs wouldn't be hard.)
-----
Anyway, accessibility's always an important issue and I hope it gets the
attention it deserves. And it's good to see someone stating the view from
the 'other' side, lest the rest of us forget.
Cheers,
has
**Is it my imagination, or do user stylesheets in IE5/Mac fail to override
page-specified stylesheets? (Which totally defeats their purpose. Gaaah.)