"Speech" item in WebView contextual menus
"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