Re: iCal Mystery -- description of calendar when description is missing value
Re: iCal Mystery -- description of calendar when description is missing value
- Subject: Re: iCal Mystery -- description of calendar when description is missing value
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 08 Feb 2006 10:40:25 -0800
- Thread-topic: iCal Mystery -- description of calendar when description is missing value
Title: Re: iCal Mystery -- description of calendar when description is missing value
Ah - right. I'd never, ever noticed that field before. Was it also there in Panther (anyone)?
It's a shame that the AppleScript implementers didn't simply make a default value of "" for that text property instead of blanking out - not even 'missing value = which errors when you try to use it. All the iApps were full of that sort of crap in their first versions, but usually manage to fix it in second version. Not here. It does mean you need to work around as the first poster suggested:
try
set x to description of calendar 1
x
on error
set x to ""
end try
The necessity to get x a second time to force the error (so it doesn't occur later on unexpectedly, when you try to use x) is another of those glitches rife in the Cocoa apps. If the developers ever actually used AppleScript, I don't see how they could leave such a thing in place.
--
Paul Berkowitz
From: David Crowe <email@hidden>
Date: Wed, 8 Feb 2006 09:04:05 -0700
To: <email@hidden>
Cc: Paul Berkowitz <email@hidden>
Subject: Re: iCal Mystery -- description of calendar when description is missing value
Paul;
I disagree with your assessment. If I use the code...
tell application "iCal"
tell calendar "CDG"
{name, title, description}
end tell
end tell
--> {"CDG", "CDG", "CDMA Development Group"}
The name and title return the same thing, which is the short name shown in the iCal calendar window.
The description returns the text that is shown in smaller type in the "Info" window when you have a calendar selected, rather than an individual event.
In the iCal dictionary (on 10.4.4) the description field is listed and it says "This is the calendar description" (which isn't terribly helpful, but it appears to be a legitimate field).
- David Crowe
At 12:34 AM -0800 2/8/06, Paul Berkowitz wrote:
Actually, 'description' property of a calendar has nothing to do with the
name. Back in Panther it would give you the immense file content of the
calendar - the whole thing, every event included in iCal format, if I
remember correctly (and so rather useless). Calendars are stored differently
in Tiger, so you get nothing. Supposing you actually wanted that complete
file content, that would be a bug. probably it should just be removed from
the dictionary.
To get the name of the calendar, ask for 'name', not 'description'. Or
'title', which is what it was called on Panther - that still works in Tiger
though not in the dictionary.
_______________________________________________
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