Re: Dave Lyons
Re: Dave Lyons
- Subject: Re: Dave Lyons
- From: Luther Fuller <email@hidden>
- Date: Mon, 26 Sep 2005 15:43:43 -0500
Title: Re: Dave Lyons
Dave Lyons said ...
I'm glad I joined the list (only ~5 weeks
ago). Already, discussions
started here resulted in scripting improvements for a future
version
of Finder, several good Radar bugs being filed, and an
apparent
Finder bug turning out to be a
3rd-party-product issue instead.
It appears that someone is paying attention to the current state
of AppleScript, so I'll take advantage and give my opinion while
someone is listening.
Let's deal with a small item first ... What ever happened to that
Bug Report I filed in May, problem ID 4121847 ?
Now, I want to report on two programming experences I've had that
have formed my not so good opinion of AppleScript.
First, back in 1981, I started a new job teaching university
mathematics. My duties included testing entering students for remedial
math and I had cardboard boxes full of paper records going back to the
1950s. Looking-up a 20 year old test score in paper records may take
hours instead of seconds. It was impossible not to notice that there
was large computer in the math building (it occupied a whole wing of
the building). Despite not having any experience of any kind with
computers, in a few months I had written a database program and moved
the paper records to disk. Learning to program was made easy due to
the clear consice Algol and CANDE OS manuals. I simply did exactly
what the manuals instructed for syntax, grammar and data types and got
exactly the results I needed. My program just worked.
Now let's move forward to just a month ago. I wanted to
read/write plist files using System Events' Property List Suite. The
Property List Suite is very short and, therefore, one would think it
would be easy to use and understand. After trying a few things that
didn't work, I finally decided that the Property List Suite didn't say
anything instructive and I didn't understand it. After more
experiments, I came up with these handlers that do work ...
on readPlistFile(fileAlias)
POSIX path of fileAlias
tell application "System Events"
value of contents of property list file the result
end tell
return the
result -- a record
end readPlistFile -------------------------------
on writePlistFile(fileAlias, plistRec)
POSIX path of fileAlias
tell application "System Events"
set
(value of contents of property list file the result) to plistRec
end tell
end
writePlistFile -------------------------------
There isn't anything in the Property List Suite dictionary that
tells me that 'value of contents of property list file ...' is what I
should use. I just tried a bunch of stuff until something worked. This
isn't the way a language manual, or dictionary, is supposed to
work!
The one thing I hate most about AppleScript is having to find
workarounds for something that ought to just work like the dictionary
says it should. Sometimes this can take hours. It ought to be as easy
as reading the manual, then doing it right the first time.
Apple ought to ...
1. Sit down, relax, take a deep breath and accept that
AppleScript needs a lot of work.
Putting it off only makes the problem
worse.
2. Take all those bug reports in the "Round Tuit" box
and move them to the "Do It Now" box.
3. Review the dictionaries of everything in CoreServices and
every Apple application and
make them work without the need for
workarounds.
4. Rethink the way dictionaries are written and come up with
something better.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden