[Pythonmac-SIG] appscript with todos in iCal seams very slow

has hengist.podd at virgin.net
Tue Aug 8 17:50:33 CEST 2006


On 8 Aug 2006, at 01:49, Marcin Komorowski wrote:

> I guess when I get to updating individual values in selected todos  
> records, I will have to use a relatively slow request-per-update  
> method.  Is there a trick to update a field of a todo with a given  
> uid in a single request?

You can set multiple properties in a single command  by assigning a  
record containing values for the properties you want to change to the  
'properties' property, e.g.:

     myevent.properties.set({k.start_time: t1, k.end_time: t2})

If you have a multi-object reference, you can assign the same value  
to properties in all of those objects using a single 'set' command,  
e.g.:

     mycalendar.todos.priority.set(k.high_priority)


That's about the limit of it though, e.g. if you've got a list of  
references or want to assign different values to each then you have  
to do them individually.

BTW, the next version of appscript has a number of performance  
improvements that should speed things up a bit at the Python end.  
I'll have a copy up shortly.

has
-- 
http://freespace.virgin.net/hamish.sanderson/




More information about the Pythonmac-SIG mailing list