• 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
Uncooperative Services Menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Uncooperative Services Menu


  • Subject: Uncooperative Services Menu
  • From: David Burnard <email@hidden>
  • Date: Wed, 20 Mar 2013 14:28:30 -0700

At the moment our app doesn't support Services, so we don't register any types with  registerServicesMenuSendTypes
and when our app receives validRequestorForSendType we return nil.

But we do have edit boxes, and they register their support for text types all on their own.

We have a shortcut Cmd-Shift-L that conflicts with Safari's "Search with Google" service.

The problem we have is that the ServicesMenu is eating the shortcut no matter what the user has selected. So if we have our
own data selected in one of our own windows, services menu still steals the Cmd-Shift-L shortcut, highlights the menu and does nothing.
In fact in the debugger it complains:

2013-03-20 14:19:41.998 MyAppnameHere[18063:303] Unable to find object to handle service <_NSServiceEntry - 0x15960e7d0:
	bundleIdentifier:		com.apple.Safari
	bundlePath:			/Applications/Safari.app
	executablePath:			(null)
	defaultTitle:			Search With %WebSearchProvider@
	localizedTitleWithoutSubstitutions:			Search With %WebSearchProvider@
	defaultKeyboardShortcut:	<NSKeyboardShortcut: 0x1594aee90 (⇧⌘L)>
	keyboardShortcut:		<NSKeyboardShortcut: 0x1594aee90 (⇧⌘L)>
	message:			searchWithWebSearchProvider
	portName:			Safari
	sendPasteboardTypes:		[public.utf8-plain-text]
	returnTypes:			[(null)]
	userData:			(null)
	languages:			[(null)]>

If the user opens the services menu in this state, that causes the underlying Services Manager(?) code to update which services might be
eligible to fire and from then on our keyboard shortcut action fires.  A similar thing happens if you then select some text in an edit box, the
Safari service won't start firing until you open the Services menu again and the underlying code refigures which services are eligible.

Clearly this sort of thing needs to happen whenever the "selection" changes from one type to another, and we must not be triggering it.
I thought calling [[NSApp servicesMenu] update] might help, but it doesn't
Any clues would be appreciated…

Thanks,

Dave B
_______________________________________________

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


  • Follow-Ups:
    • Re: Uncooperative Services Menu
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Watching a file for changes.
  • Next by Date: Re: Uncooperative Services Menu
  • Previous by thread: Re: exc bad access when change the contentSize of popover
  • Next by thread: Re: Uncooperative Services Menu
  • Index(es):
    • Date
    • Thread