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 00:24:06 -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
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.
tell application "iCal"
name of every calendar
end tell
--> {"Work", "None", "Student", "Friends", "Holiday", "Personal", "Recreation", "Rehearsal", "Family", "Urgent", "Beta Friends", "Travel", "Test", "Script Test", "Holiday - United States"}
--
Paul Berkowitz
From: David Crowe <email@hidden>
Date: Tue, 7 Feb 2006 22:32:14 -0700
To: <email@hidden>
Subject: iCal Mystery -- description of calendar when description is missing value
Almost all of my calendar names in iCal are 'missing value', as shown by:
tell application "iCal"
description of every calendar
end tell
--> {missing value, missing value, missing value....}
But if I try to get the description of one calendar I have a problem:
tell application "iCal" to tell calendar 1
set x to description
x
end tell
--> ERROR: Variable x is not defined
The best I have come up with to handle this situation is:
tell application "iCal" to tell calendar 1
set CalendarDescription to description
try
CalendarDescription
on error
set CalendarDescription to ""
end try
CalendarDescription
end tell
--> ""
Is this just something I need to live with, or is there a better way?
- David Crowe
_______________________________________________
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
_______________________________________________
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