Alert message display when application in startup in hidden mode.

Discussion in 'Mac Programming' started by newformac, May 31, 2011.

  1. macrumors regular

    Joined:
    May 24, 2011
    #1
    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.
     
  2. macrumors 6502a

    Joined:
    Apr 1, 2007
    #2
    How about just a singleton for a simple boolean control variable appStartedHidden and then implement the two states?
     
  3. thread starter macrumors regular

    Joined:
    May 24, 2011
    #3
    can u please explain me more how can i do this?
     
  4. macrumors 6502a

    Joined:
    Apr 1, 2007
    #4
    Which part don't you understand?
     
  5. thread starter macrumors regular

    Joined:
    May 24, 2011
    #5
    i m auto start my application using login window.

    now please help me for this.
     
  6. macrumors 6502a

    Joined:
    Apr 1, 2007
    #6
    What part of what I said didn't you understand?
     
  7. thread starter macrumors regular

    Joined:
    May 24, 2011
    #7
    i mean to say how and where use this?

    "singleton for a simple boolean control variable appStartedHidden"
     
  8. macrumors 6502a

    Joined:
    Apr 1, 2007
    #8
    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
     
  9. thread starter macrumors regular

    Joined:
    May 24, 2011
    #9
    have u any example for this.
     

Share This Page