Re: How to check if Address Book has changed?
Re: How to check if Address Book has changed?
- Subject: Re: How to check if Address Book has changed?
- From: Brad <email@hidden>
- Date: Fri, 7 Feb 2003 23:37:00 -0700
On Friday, February 7, 2003, at 05:12 PM, Yuhui wrote:
Hi,
Is there any way to check if changes have been made to Address Book
(AB)? I have an app that uses AB and I want to set it up so that when
the user updates AB, my app knows about the change/s and updates
itself automatically. I searched AB.framework but there doesn't seem
to be any notification or messages sent by AB.
I could use AB's hasUnsavedChanges: method, but that raises another
question: when I make a change to AB, is the change saved (a)
immediately, (b) when I stop editing the card, or (c) when I quit AB?
If it's (b), then I could use hasUnsavedChanges:, and if it's (c),
then I could use NSWorkspace. But if it's (a), then hasUnsavedChanges:
would return NO as if no changes have been made, and I'll be stuck.
You can register to listen for the
kABDatabaseChangedExternallyNotification. I think that's what you're
looking for. When ever a change is made to the AB database it'll
notify your app and you can do what ever updating that's needed.
Brad
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.