Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 2, 2011, 03:12 AM   #1
geoldr
macrumors newbie
 
Join Date: Apr 2011
Help with running in background

Hello, so I have created an application that uses the
"Application is background only" plist variable to run my program without a menu bar or dock icon. I have created an NSStatusMenu, and when i click that my main window opens. I am having a problem, however, with the program displaying behind other windows. So if I run my program from xcode, and open the window by clicking the icon in the menu, it will pop up behind xcode, and I have to move xcode to see it. I am sure there has to be a way to make it show it show up on top. Does anybody have a way to do this?
geoldr is offline   0 Reply With Quote
Old Apr 2, 2011, 11:28 AM   #2
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
You probably need to make your app the frontmost:

Code:
[NSApp activateIgnoringOtherApps:YES];
kainjow is offline   0 Reply With Quote
Old Apr 2, 2011, 06:24 PM   #3
geoldr
Thread Starter
macrumors newbie
 
Join Date: Apr 2011
Ok cool thank you, you pointed me in the right direction. I used this code
Code:
[NSApp activateIgnoringOtherApps: YES];
[window makeKeyAndOrderFront: self];
geoldr is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Help with port forwarding for Security software? PPFee Mac Applications and Mac App Store 1 Dec 11, 2011 03:34 PM
Sbsetting not showing with cydia running in background unitcrash iPhone Tips, Help and Troubleshooting 0 Feb 1, 2011 02:57 AM
how can I make my application to run in background??? sspbond007 iPhone/iPad Programming 27 Jan 12, 2010 04:31 AM
does mail app run in background? afd iPhone Tips, Help and Troubleshooting 3 Feb 18, 2008 04:14 AM
SELECTED TEXT Color Change FOR WINDOWS running IN BACKGROUND? Stonecoldcleric OS X 2 Jan 17, 2007 03:45 PM


All times are GMT -5. The time now is 01:00 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC