Re: Automatically activate next window after one is closed
Re: Automatically activate next window after one is closed
- Subject: Re: Automatically activate next window after one is closed
- From: Felipe Monteiro de Carvalho <email@hidden>
- Date: Sat, 15 Aug 2015 18:18:45 +0200
On Sat, Aug 15, 2015 at 2:12 PM, Ken Thomases <email@hidden> wrote:
> That's PyObjC syntax, which not everybody on this list can be expected to recognize.
Actually its Objective Pascal (see
http://wiki.freepascal.org/FPC_PasCocoa#Creating_and_running_application_with_one_menu_item
), but C also uses point to access internal members, so I would expect
anyone to be familiar to it. I would find it unlikely someone to be
familiar with only the objects part of Objective C and not with the C
part.
> Anyway, is your app bundled in a .app bundle directory with a proper Info.plist, etc. ?
> Or does it start as a command-line tool or naked executable?
> If the latter, do you transform it into a foreground process by setting the application object's
> activationPolicy to NSApplicationActivationPolicyRegular?
> Have you activated it using -activateIgnoringOtherApps: with a true argument?
Aha! wow, I didn't expect this :) It does work normally if I start the
application by opening the .app bundle!
But I was all the time testing with an IDE, which uses gdb to debug
the app, and only in this case it doesn't work :D
So you are saying that I can in code do something to work around the
problem with NSApplicationActivationPolicyRegular? I'll try that. I
just wonder how to recognize if the app was started by gdb or by app
bundle...
But it looks like that in the worse case I could just ignore the issue.
thanks,
--
Felipe Monteiro de Carvalho
_______________________________________________
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