(informal protocol)
| Framework | /System/Library/Frameworks/AddressBook.framework |
| Availability | Available in Mac OS X v10.3 and later. |
| Companion guide | |
| Declared in | ABActions.h |
The ABActionDelegate informal protocol allows you to populate the rollover menus of Address Book with custom items. You do this by implementing an Address Book action plug-in. The plug-in’s NSBundle must implement actionProperty:, titleForPerson:identifier: and performActionForPerson:identifier:.
Each action plug-in can implement only one action. Actions can only apply to items with labels.
Use Xcode to create Address Book action plug-ins. Place action plug-ins in ~/Library/Address Book Plug-Ins or /Library/Address Book Plug-Ins, depending on the scope you want for the action.
- (NSString *)actionProperty
Sent to the delegate to request the ABProperty (“Person Properties”) the action applies to.
ABActions.h- (void)performActionForPerson:(ABPerson *)person identifier:(NSString *)identifier
Sent to the delegate to perform the action. If the property returned by actionProperty is a multi-value property, identifier contains the unique identifier of the value selected.
ABActions.h- (BOOL)shouldEnableActionForPerson:(ABPerson *)person identifier:(NSString *)identifier
Sent to the delegate to determine whether the action should be enabled. If the property returned by actionProperty is a multi-value property, identifier contains the unique identifier of the value selected.
Return YES is the action is applicable and NO otherwise.
ABActions.h- (NSString *)titleForPerson:(ABPerson *)person identifier:(NSString *)identifier
Sent to the delegate to request the title of the menu item for the action. If the property returned by actionProperty is a multi-value property, identifier contains the unique identifier of the value selected.
Return the title of the menu item for the action.
ABActions.h
© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-05-23)