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 May 31, 2011, 05:27 AM   #1
newformac
Banned
 
Join Date: May 2011
Alert message display when application in startup in hidden mode.

hi all,

i m start my application whenever my mac os started or any user is logged in.

i m placing a alert message on awakeFromNib and applicationShouldHandleReopen function.

i want when application started from startup in hidden mode these alert message should not display,and when user wants to open app from Application than alert message display.

please help me to do this.

thanks in advance.
newformac is offline   0 Reply With Quote
Old May 31, 2011, 05:46 AM   #2
Hansr
macrumors 6502a
 
Join Date: Apr 2007
How about just a singleton for a simple boolean control variable appStartedHidden and then implement the two states?
Hansr is offline   0 Reply With Quote
Old May 31, 2011, 06:37 AM   #3
newformac
Thread Starter
Banned
 
Join Date: May 2011
can u please explain me more how can i do this?
newformac is offline   0 Reply With Quote
Old May 31, 2011, 07:00 AM   #4
Hansr
macrumors 6502a
 
Join Date: Apr 2007
Which part don't you understand?
Hansr is offline   0 Reply With Quote
Old Jun 3, 2011, 12:20 AM   #5
newformac
Thread Starter
Banned
 
Join Date: May 2011
Quote:
Originally Posted by Hansr View Post

How about just a singleton for a simple boolean control variable appStartedHidden and then implement the two states?

Which part don't you understand?

singleton and appStartedHidden
i m auto start my application using login window.

now please help me for this.
newformac is offline   0 Reply With Quote
Old Jun 3, 2011, 08:36 AM   #6
Hansr
macrumors 6502a
 
Join Date: Apr 2007
What part of what I said didn't you understand?
Hansr is offline   0 Reply With Quote
Old Jun 3, 2011, 11:51 PM   #7
newformac
Thread Starter
Banned
 
Join Date: May 2011
i mean to say how and where use this?

"singleton for a simple boolean control variable appStartedHidden"
newformac is offline   0 Reply With Quote
Old Jun 6, 2011, 03:52 AM   #8
Hansr
macrumors 6502a
 
Join Date: Apr 2007
Okay the application itself should have singleton class which is initiated upon starting the program. That class will know whether the application was opened and directly hidden or not. Each part of the application can then query the singleton class for the state the application was opened in.

http://en.wikipedia.org/wiki/Singleton_pattern
Hansr is offline   0 Reply With Quote
Old Jun 7, 2011, 01:56 AM   #9
newformac
Thread Starter
Banned
 
Join Date: May 2011
Quote:
Originally Posted by Hansr View Post
Okay the application itself should have singleton class which is initiated upon starting the program. That class will know whether the application was opened and directly hidden or not. Each part of the application can then query the singleton class for the state the application was opened in.

http://en.wikipedia.org/wiki/Singleton_pattern
have u any example for this.
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
Update Alert for an Incorrect Application ZahidHafeez Mac Applications and Mac App Store 0 Sep 28, 2013 02:00 AM
Message alert! Dzupiris iOS 7 1 Sep 22, 2013 08:28 AM
Application Alert Issue MorganDecker iPhone 1 Aug 7, 2013 04:59 PM
iPhone will not alert me when receiving a new SMS message Malcy16 iPhone Tips, Help and Troubleshooting 1 Apr 1, 2013 06:58 AM
rMBP won't startup in recovery mode or safe mode tcal10 MacBook Pro 1 Aug 12, 2012 03:15 PM

Forum Jump

All times are GMT -5. The time now is 12:17 PM.

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

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