• 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: ContextualMenu in text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >ContextualMenu in text (From: Ivan C Myrvold <email@hidden>)

  • Prev by Date: ContextualMenu in text
  • Next by Date: Fetching a CalEvent with earliest startDate
  • Previous by thread: ContextualMenu in text
  • Next by thread: Re: ContextualMenu in text
  • Index(es):
    • Date
    • Thread