Re: ical todo notes
Re: ical todo notes
- Subject: Re: ical todo notes
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 24 Nov 2003 19:14:11 -0800
On 11/24/03 2:31 PM, "Paul Berkowitz" <email@hidden> wrote:
>
Yup. And if you want to change it after the fact, you can't even access it:
>
>
get sound alarm 1 of newEvent
>
--> <<undefined>>
>
>
That's the method that usually works when all else fails, but it doesn't
>
work here either.
>
>
set ss to every sound alarm of newEvent
>
--> {application "iCal"}
>
>
>
There's obviously not much you can do with a stupid list item like that.
>
>
set ss to every sound alarm of e
>
trigger interval of (item 1 of ss)
>
-->iCal got an error: NSCannotCreateScriptCommandError
Well, here's how it works"
get trigger interval of sound alarm 1 of e
--> -15
get trigger interval of every sound alarm of e
--> {-15, 20}
get properties of sound alarm 1 of e
--> {class:sound alarm, sound name:"Sosumi", trigger interval:-15}
What you can't do is:
set s to sound alarm 1 of e
--> <<undefined>>
get trigger interval of s
--> ERROR: The variable s is not defined
So this is the opposite of all those properties which need the explicit
'get' or a variable to evaluate the element or class they're 'of'. Here's
it's teh exact opposite; you _can't_ use the explicit 'get' or a variable!
I've never seen anything like this.
It's the same with 'attendee', except worse.
get properties of attendee 1 of e
--> {class:attendee, participation status:unknown, display name:"Joseph
Blowfish", email:"email@hidden"}
But:
get properties of attendee 2 of e
--> {class:attendee, participation status:unknown, display
name:"Georgie Porgie", email:"nomail"}
See that "nomail"? This attendee has no email address. Instead of "" or
missing value, it's "nomail". What kind of nonsense is this?
And if you delete an 'email' from the attendee, it never disappears. It
remains forever and ever and ever and ever. you have to delete the whole
attendee and recreate it without an email to get rid of the damn thing.
Then there's this:
get properties of attendee 3 of e
--> {class:attendee, participation status:unknown, display name:missing
value, email:"email@hidden"}
OK, looks fair enough : 'missing value' for no display name. Look at this:
set dn to display name of attendee 3 of e
--> <<undefined>>
And the killer:
tell attendee 3 of e
set {dName, eAddress, stat} to {display name, email, participation
status}
end tell
--> {current application, "email@hidden", unknown}
That 'current application' shows up as <<empty>> in Scirpt Debugger.
<<empty>>?
So if you then go on to
tell attendee 3 of e
set {dName, eAddress, stat} to {display name, email, participation
status}
end tell
if dName missing value then "squelch"
--> The variable dName is undefined.
And so on. It's all booby-trapped. You can find workarounds and certain
exclusive methods that work, but what a mess. Only people who don't know
AppleScript could come up with stuff like this. Why are they working for
Apple? It's like OS 10.0.0's AppleScript all over again.
I'm very pleased with the progress made by Address Book, which now must be
the model iApp. Everything works well there, aside from a pretty trivial bug
(with anniversary). Why can't they learn anything with the other apps? iCal
is a minefield of badly-implemented AppleScript - shoddy work. If Cocoa were
treated this way no one would be using OS X.
Let's hope they fix it for iCal 2.0. I imagine they will. If anyone ever
finds a v1.0 of any Apple app, aside from Script Editor made by the
AppleScript team themselves, properly implemented, I'll personally send them
a prize.
--
Paul Berkowitz
_______________________________________________
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.