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 Jun 6, 2011, 11:25 PM   #1
newformac
Banned
 
Join Date: May 2011
How to identify app is currently show or hide?

Hi all

i using this to sho and hide my app

Code:
[mainwindow orderOut:nil]; // to hide it
		  
[mainwindow makeKeyAndOrderFront:nil]; // to show it
now please tell at running time how can identify the app is show or hide?

please help me for this.

thanks in advance.
newformac is offline   0 Reply With Quote
Old Jun 6, 2011, 11:42 PM   #2
jiminaus
macrumors 65816
 
Join Date: Dec 2010
Location: Sydney
[mainWindow isVisible] && ![mainWindow isMiniaturized]
jiminaus is offline   0 Reply With Quote
Old Jun 7, 2011, 12:03 AM   #3
newformac
Thread Starter
Banned
 
Join Date: May 2011
Quote:
Originally Posted by jiminaus View Post
[mainWindow isVisible] && ![mainWindow isMiniaturized]
how can i use isVisible from any other class or window?
newformac is offline   0 Reply With Quote
Old Jun 7, 2011, 12:21 AM   #4
newformac
Thread Starter
Banned
 
Join Date: May 2011
i m using [controlPanel orderOut:nil]; in awakeFromNib but still the window is show.
newformac is offline   0 Reply With Quote
Old Jun 7, 2011, 12:42 AM   #5
jiminaus
macrumors 65816
 
Join Date: Dec 2010
Location: Sydney
Is your goal just to not have the window shown when the nib loaded?
jiminaus is offline   0 Reply With Quote
Old Jun 7, 2011, 01:07 AM   #6
newformac
Thread Starter
Banned
 
Join Date: May 2011
Quote:
Originally Posted by jiminaus View Post
Is your goal just to not have the window shown when the nib loaded?
not alwaz but in certain condition.
newformac is offline   0 Reply With Quote
Old Jun 7, 2011, 03:10 AM   #7
jiminaus
macrumors 65816
 
Join Date: Dec 2010
Location: Sydney
Try unticking visible at launch in the window property inspector in interface builder. This will stop the window from appearing automatically. Then order the window on screen when you want it to be shown.
jiminaus is offline   0 Reply With Quote
Old Jun 7, 2011, 04:32 AM   #8
newformac
Thread Starter
Banned
 
Join Date: May 2011
thanks its done from awakeFromNib .
i am automatically start my application using LoginWindow whenever Mac machine is on or whenever any user logged in.

at this time if i place some alert message in awakeFromNib than app is display otherwise its run in hidden mode,i want to detect the automatically start position to avoid this alert message.

Code:
[[NSAlert alertWithMessageText:@"Alert Message"
			defaultButton:@"OK" alternateButton:nil otherButton:nil
			informativeTextWithFormat:@"Alert Message"] runModal];
and please also tell me how can i identify the app is show or hide from other class that is derived from NSObject.

Last edited by newformac; Jun 7, 2011 at 04:47 AM.
newformac 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

Similar Threads
thread Thread Starter Forum Replies Last Post
Show/Hide Full Path of Files arianartizan OS X 10.8 Mountain Lion 6 Jan 2, 2013 12:41 PM
iTunes 11: Hide TV Show Descriptions? ayzee Apple TV and Home Theater 0 Dec 6, 2012 02:45 PM
Show & hide app darksiders Mac Basics and Help 0 Oct 12, 2012 07:55 AM
General: The apps show up after hide them Processor iOS 6 2 Oct 11, 2012 04:58 AM
How to show/hide objects in Cocoa Applescript application sjmonty99 Mac Programming 3 Aug 6, 2012 11:02 AM

Forum Jump

All times are GMT -5. The time now is 02:54 AM.

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

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