Next Page > Hide TOC

ABActionDelegate Protocol Objective-C Reference

(informal protocol)

Framework
/System/Library/Frameworks/AddressBook.framework
Availability
Available in Mac OS X v10.3 and later.
Companion guide
Declared in
ABActions.h

Overview

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.

Tasks

Performing Actions

Queries

Instance Methods

actionProperty

- (NSString *)actionProperty

Discussion

Sent to the delegate to request the ABProperty (“Person Properties”) the action applies to.

Availability
Declared In
ABActions.h

performActionForPerson:identifier:

- (void)performActionForPerson:(ABPerson *)person identifier:(NSString *)identifier

Discussion

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.

Availability
Declared In
ABActions.h

shouldEnableActionForPerson:identifier:

- (BOOL)shouldEnableActionForPerson:(ABPerson *)person identifier:(NSString *)identifier

Discussion

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.

Availability
Declared In
ABActions.h

titleForPerson:identifier:

- (NSString *)titleForPerson:(ABPerson *)person identifier:(NSString *)identifier

Discussion

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.

Availability
Declared In
ABActions.h

Next Page > Hide TOC


© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-05-23)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.