• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trouble refreshing iCal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble refreshing iCal


  • Subject: Re: Trouble refreshing iCal
  • From: Aram Kudurshian <email@hidden>
  • Date: Sun, 29 Jan 2006 23:53:46 -0500

Hi Mike,

You're assumption is entirely correct. My whole goal is to allow editing of To Do items without having to have iCal open.

I looked into the solution you've suggested but a side effect now is that even if my applescript asks iCal to save the file to disk, it won't immediately. This means that my program can't re-parse the calendar and show the changes immediately.

I just wish there was a way to have iCal reload itself, without having to have it relaunched.

Aram

On Jan 29, 2006, at 3:13 PM, Mike Abdullah wrote:

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
  • Follow-Ups:
    • Re: Trouble refreshing iCal
      • From: Mike Abdullah <email@hidden>
    • Re: Trouble refreshing iCal
      • From: Greg Herlihy <email@hidden>
References: 
 >Trouble refreshing iCal (From: Aram Kudurshian <email@hidden>)
 >Re: Trouble refreshing iCal (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: KVC broken in 10.4.4 on Intel?
  • Next by Date: Menu items disabled - Loading a ui framework from cocoa app
  • Previous by thread: Re: Trouble refreshing iCal
  • Next by thread: Re: Trouble refreshing iCal
  • Index(es):
    • Date
    • Thread