PDA

View Full Version : Alert message display when application in startup in hidden mode.




newformac
May 31, 2011, 05:27 AM
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
May 31, 2011, 05:46 AM
How about just a singleton for a simple boolean control variable appStartedHidden and then implement the two states?

newformac
May 31, 2011, 06:37 AM
can u please explain me more how can i do this?

Hansr
May 31, 2011, 07:00 AM
Which part don't you understand?

newformac
Jun 3, 2011, 12:20 AM
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.

Hansr
Jun 3, 2011, 08:36 AM
What part of what I said didn't you understand?

newformac
Jun 3, 2011, 11:51 PM
i mean to say how and where use this?

"singleton for a simple boolean control variable appStartedHidden"

Hansr
Jun 6, 2011, 03:52 AM
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

newformac
Jun 7, 2011, 01:56 AM
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.