Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

newformac

macrumors regular
Original poster
May 24, 2011
107
0
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.
 

Hansr

macrumors 6502a
Apr 1, 2007
897
1
How about just a singleton for a simple boolean control variable appStartedHidden and then implement the two states?
 

newformac

macrumors regular
Original poster
May 24, 2011
107
0
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

macrumors regular
Original poster
May 24, 2011
107
0
i mean to say how and where use this?

"singleton for a simple boolean control variable appStartedHidden"
 

Hansr

macrumors 6502a
Apr 1, 2007
897
1
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.