Re: Application Activation Problem
Re: Application Activation Problem
- Subject: Re: Application Activation Problem
- From: Kyle Sluder <email@hidden>
- Date: Fri, 13 May 2016 10:45:14 -0500
On Fri, May 13, 2016, at 10:21 AM, Dave wrote:
> Hi,
>
> > You might consider subscribing to
> > NSWorkspaceDidActivateApplicationNotification and cycling to the next
> > app in the list upon receipt, but the best you can do is best-effort.
> >
> > --Kyle
> >
>
> That’s actually what I am doing. I monitor
> NSWorkspaceApplicationWllLaunchNotification,
> NSWorkspaceApplicatioDidLaunchNotification and
> NSWorkspaceDidActivateApplicationNotification (as well as others). For
> each notification I get I add the BundleID of the App to an Array. Then
> at some later point, I want to cycle through the Activates and re-send
> them in the same order they were activated originally.
>
> I realise that this is not 100% perfect (because of outside influences,
> (other apps etc)), but I’d like to get it as close as possible as long as
> no other Apps are getting in the way.
>
> I suppose I could set a flag somewhere and then check it in the Activate
> notification handler.
Yeah, that’s what I’m suggesting. Your Activate handler will basically
operate in two modes: “passive” (where it adds apps to the array) and
“active” (where it dequeues an app from the array and asks NSWorkspace
to activate it).
--Kyle Sluder
_______________________________________________
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