Re: Trouble refreshing iCal
Re: Trouble refreshing iCal
- Subject: Re: Trouble refreshing iCal
- From: Mike Abdullah <email@hidden>
- Date: Sun, 29 Jan 2006 20:13:59 +0000
I've been thinking about this a little more. Can I assume that you
are writing the data directly to the calendar files so as to avoid
having to launch iCal? In which case, can I suggest something along
the following lines:
1. See if iCal is running
2. If it is then:
Use this NSAppleScript category: http://weblog.scifihifi.com/
2004/04/15/calling-applescript-handlers-from-cocoa/ to create the to
do in iCal
3. If iCal isn't running, then just use your existing method.
Mike.
On 29 Jan 2006, at 16:49, Aram Kudurshian wrote:
Hi,
I've written a small program that writes To Dos to iCal's calendar
files but am having trouble getting iCal to refresh it's listings
when open. If I write to the file and launch iCal, I have no
problems seeing the new data I've added. However, if iCal is open
and I write to the calendar file, iCal refuses to show changes
until iCal is quit and then relaunched - not an optimal solution as
if iCal makes any changes, it will overwrite my changes.
I've tried using the AppleScript function reload calendars but it
fails to do anything at all. I don't know whether this is broken
or just the way it works.
So, has anyone devised a solution into forcing iCal to reload it's
calendar listing? I was thinking of using AppleEvents but my
knowledge of the matter is close to nothing. The only thing I've
been able to do so far is download Script Debugger and determine
that the simple AppleScript:
tell application 'iCal'
reload calendars
end tell
...is translated into the following events:
'ascr'\'tell'{ '----':'psn '($0000000003EC0001$) }
'wrbt'\'aec8'{ &'subj':''null''(), &'csig':65536 }
'ascr'\'tend'{ }
If anyone has done this before or would know how to convert this
into an AppleEvent that my program could send, I'd be greatly
appreciative. Or, does anyone know of any workarounds that could
have my desired effect?
Thanks,
Aram Kudurshian
Aram Kudurshian
Hamilton College
198 College Hill Road
Clinton, NY 13323
www.kudurshian.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden