Re: ContextualMenu in text
Re: ContextualMenu in text
- Subject: Re: ContextualMenu in text
- From: "I. Savant" <email@hidden>
- Date: Mon, 4 Feb 2008 07:22:37 -0500
I would like to make a contextual menu, like there is in a Mail
message when your cursor is hovering over a name, the name is
getting framed and there is a small arrow you can click and get a
menu item "Show in Address Book".
Is there an API for this in Cocoa?
Automatically recognizing a name and matching it to an Address Book
entry? No. You'd have to use the AddressBook framework to build a list
of possible matches (like Mail does) so the user can correct an
incorrect guess if you have three "John Smith"s.
You'd want to remember the ABRecord's unique id for quick opening.
From there you can just do this:
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString
stringWithFormat:@"addressbook://%@", someABRecordID]]];
--
I.S.
On Feb 4, 2008, at 7:16 AM, Ivan C Myrvold wrote:
I would like to make a contextual menu, like there is in a Mail
message when your cursor is hovering over a name, the name is
getting framed and there is a small arrow you can click and get a
menu item "Show in Address Book".
Is there an API for this in Cocoa?
Ivan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden