Re: Forcing an application into the foreground
Re: Forcing an application into the foreground
- Subject: Re: Forcing an application into the foreground
- From: Chilton Webb <email@hidden>
- Date: Wed, 02 Mar 2005 15:32:29 -0600
Hi Sarah,
On Wednesday, March 02, 2005, at 02:55PM, Sarah Dumoulin <email@hidden> wrote:
> I have a coca application that I am calling through an execlp call in a
>c program. The application launches properly, however it is always in the
>background (no windows are visible). I had thought that calling
>makeKeyAndOrderFront on the window that I wanted visible would fix this
>problem, but doing so made no difference. Does makeKeyAndOrderFront only
>order windows within an application? If so, is there some way of forcing
>the application itself into the foreground? I didn't see a method that
>seemed appropriate under NSApplication, but I am far from a cocoa expert :)
>
> I don't want to run a modal window (although perhaps forcing the app
>briefly into modal mode would work as a kluge?). I would just like the user
>to be able to see the running application without having to command-tab or
>choose it off the finder bar. Any suggestions or pointers would be greatly
>appreciated.
You could take the easy approach and use the 'open' command from an NSTask call.
Oh, in C, I suppose popen("open <appname>") would suffice.
-Chilton
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden