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

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
How to downgrade a jailbroken iPhone iOS 4.2.1 to 3.1.3 when stuck in recovery mode Granitel Jailbreaks and iOS Hacks 0 Oct 23, 2011 01:59 AM
How to identify app is running in hidden mode? newformac Mac Programming 2 Jun 9, 2011 12:01 AM
Mail.app won't start in hidden mode. Bechmann OS X 2 Dec 9, 2007 05:20 PM
Mail.App & IMAP: No messages display when selecting mailbox baugusta Mac Applications and Mac App Store 4 Aug 15, 2007 08:08 PM
MacBook Startup in Sleep Mode memo06dic MacBook Pro 1 Jul 25, 2007 10:52 AM


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

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

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