Re: Using NSTerminateLater with a Status Item

  • > Hi Olivier.
    >
    > rdar://problem/6001460
    >
    > See http://lapcatsoftware.com/rdar/6001460/index.html for an explanation.
    >
    > In short, you won't be able to do it with a LSUIElement app.
    >
    > -Jeff
    >

    Is there a work-around for this?

    I need to delay shutdown of a LSUIElement app during logout for a few
    seconds to let a system call complete.

    I have tried calling:

        [[NSApplication sharedApplication] setActivationPolicy:
    NSApplicationActivationPolicyRegular];

    During a NSWorkspaceWillPowerOffNotification callback.

    Doesn't work.

    I have tried using NSTerminateLater with a timer, same results.

    Any other way to do this or to get notified any earlier of an impending
    shutdown or log out?

    Trygve
previous month july 2012 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today