• 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
"Speech" item in WebView contextual menus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"Speech" item in WebView contextual menus


  • Subject: "Speech" item in WebView contextual menus
  • From: Andy Lee <email@hidden>
  • Date: Tue, 05 Mar 2013 12:08:22 -0500

I'm implementing a WebView delegate method called webView:contextMenuItemsForElement:defaultMenuItems:. It gives me a proposed list of items for the web view's contextual menu, and allows me to modify the list as I see fit before the menu is presented on-screen.

I iterate through the list and cherry-pick the ones I want to keep. I do this by examining the tag of each menu item and comparing it to one of the constants provided for this purpose:

enum {
    WebMenuItemTagOpenLinkInNewWindow=1,
    WebMenuItemTagDownloadLinkToDisk,
    WebMenuItemTagCopyLinkToClipboard,
    WebMenuItemTagOpenImageInNewWindow,
    WebMenuItemTagDownloadImageToDisk,
etc.

My problem is that there isn't a WebMenuItemTag constant for the "Speech" menu item. I do see that menu item in the proposed list, with a tag of 2015. Is this constant defined elsewhere? I looked in vain in the docs for NSTextView, which has a similar delegate method. I also searched for API names containing "MenuItemTag" and even "speech".

I don't mind filing a Radar requesting such a constant, but first I wanted to check whether I'm missing something.

--Andy


_______________________________________________

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

  • Prev by Date: Re: Core Data migration: how to delete some managed objects?
  • Next by Date: Re: Core Data migration: how to delete some managed objects?
  • Previous by thread: Re: getting ivar of fundamental types with object_getInstanceValue
  • Next by thread: Turning off screen shot ability
  • Index(es):
    • Date
    • Thread