From: Ronald Oussoren <ronaldoussoren@ma...> - 2006-03-17 15:03:08
On Friday, March 17, 2006, at 01:33PM, Nick Pilon <npilon@...> wrote:
>I'm trying to work out a problem with a PyObjC application using
>AddressBooks. According to the XCode documentation,
>ABAddressBook.sharedAddressBook() is supposed to return a shared
>object instance. So when any one application using it updates the data
>stored there, all applications should see the updated data.
The 'So when...' part is not necessarily true. 'sharedAddressBook' is an
instance that is shared between all callers in your application. I would
however still expect that all users of the AddressBook API see the same
data, even if they are in different processes.
>appropriate notifications, if the application needs them) While
>updating the shared address book through PyObjC (using .save()) seems
>to work fine, updating the address book in another application does
>not seem to result in any changes being visible to PyObjC. Does anyone
>have any idea what's going wrong here?
Do you have a run loop? The addressbook framework might cache values
and if so might only update its cache when it receives notifications from
the current runloop.
Get latest updates about Open Source Projects, Conferences and News.