#import <AddressBookItem.h>
This item takes a proper name and an email address, formats itself to read "Add 'name' to Address Book," and, if selected, adds the name and address to the Address Book.
Definition at line 22 of file AddressBookItem.h.
Public Member Functions | |
| (id) | - initWithName:mailto: |
| Designated initializer, given a name and address. | |
| (NSString *) | - properName |
| Return the name to be added to the address book. | |
| (NSString *) | - emailAddress |
| Return the email address as a string. | |
| (IBAction) | - makeAddressBookEntry: |
| Action method for the menu item. | |
| (void) | - dealloc [implementation] |
Protected Attributes | |
| NSString * | name |
| the name of the addressee | |
| NSURL * | url |
| mailto: url for the addressee | |
|
|
Definition at line 30 of file AddressBookItem.m. |
|
|
Return the email address as a string. This method parses the mailto: URL retained from the initializer into an addressee@dom.ain email address string, and returns the result.
Definition at line 39 of file AddressBookItem.m. Referenced by makeAddressBookEntry:. Here is the call graph for this function: ![]() |
|
||||||||||||
|
Designated initializer, given a name and address. This initializer causes the menu item to have the text "Add “aName” to Address Book," and sets up -makeAddressBookEntry: as the action. The parameters are retained.
Definition at line 14 of file AddressBookItem.m. |
|
|
Action method for the menu item. The initializer designates this method as the action method for the menu item. It makes a new Address Book entry, with the last word of the name string the last name, the remaining words the first name, and the string returned by -emailAddress the email address.
Definition at line 47 of file AddressBookItem.m. References emailAddress, and properName. Here is the call graph for this function: ![]() |
|
|
Return the name to be added to the address book. This method returns the NSString retained for the full name to be inserted in the address book.
Definition at line 37 of file AddressBookItem.m. References name. Referenced by makeAddressBookEntry:. |
|
|
the name of the addressee
Definition at line 24 of file AddressBookItem.h. Referenced by dealloc, initWithName:mailto:, and properName. |
|
|
mailto: url for the addressee
Definition at line 25 of file AddressBookItem.h. Referenced by dealloc, emailAddress, and initWithName:mailto:. |
1.4.4