• 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: How to check if Address Book has changed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to check if Address Book has changed?


  • Subject: Re: How to check if Address Book has changed?
  • From: Vince DeMarco <email@hidden>
  • Date: Sat, 8 Feb 2003 13:50:42 -0800

On Friday, February 7, 2003, at 04: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.

I hope the above makes sense and that my assumptions in the second paragraph are correct.

The AddressBook framework will send you a notification when someone else changes the database.

the framework will send these notifications (these are defined in ABGlobals.h)

// This process has changed the DB
extern NSString * const kABDatabaseChangedNotification;

// Another process has changed the DB
extern NSString * const kABDatabaseChangedExternallyNotification;

The changes made in Address Book are saved:

1) when you stop editing the card (go out of edit mode)
2) when you switch cards
3) when the AB main window looses key focus. (you switch to another application)

vince
_______________________________________________
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.

References: 
 >How to check if Address Book has changed? (From: Yuhui <email@hidden>)

  • Prev by Date: Re: Moving connections to File's Owner to another object
  • Next by Date: Re: [OT] Multiple instances of ATSServer slowing down login/logout procedure
  • Previous by thread: Re: How to check if Address Book has changed?
  • Next by thread: Re: How to check if Address Book has changed?
  • Index(es):
    • Date
    • Thread