Well… Thanks Craig. I do work on a PPC. (Are you saying that XCode 3.1 is intel only?)
Actually I’m sort of onto something on my own here. But lacking enough of a grasp of Obj-C I’m rather gasping at straws here.
Still, what I succeeded in doing is this:
- make a custom class to implement Calendar Store methods, and define that object as an AS variable:
set WBCCalStore to (call method "newWBCcalStore" of class "WBCcalStore")
- the methods of this custom class can be called with call methods, and certain things can be done with the returned values. for example:
set these_events to call method "getEventsinRangewithStart:withEnd:" of WBCCalStore with parameters {sd, ed}
- I can get events within a range (as example above)
What I can’t do is:
- DO ANYTHING with those events. Simply getting the title of these returned event objects I can’t yet do. I haven’t been successful in writing the “gettitle:” method referred to below:
set anEvent to item 1 of these_events
-- following does not work
--set anEventTitle to title of anEvent
-- following cannot make work so for now return notice string
set anEventTitle to call method "gettitle:" of WBCCalStore with parameter anEvent
(What I’d ultimately like to do is return a list or a record of all properties of the event that can of course be accessed in applescript)
-
Be certain I’m dealing with memory and retaining and releasing objects properly.
-
Figure out how to create and retain just one instance of the CalCalendarStore rather than creating a new instance for each method of this custom class.
-
Know that I’m adding the Calendar Store framework to the project properly (as a reference to the /System/ version) without actually copying it into my builds
-
Know that I can in fact add a framework that would be used on Leopard if available but that the project build would still launch on Pather/Leopard (and work as long as these methods aren’t called). In fact if that won’t be the case it is sort of a show stopper for me right there.
The sample project so far is here (alpha 0.1):