cocoa - How to prevent logout from app running as agent -


the sample menu bar app agent lsuielement true. want prevent logout on conditions.

i tried - (nsapplicationterminatereply)applicationshouldterminate:(nsapplication *)sender. never receive message when user logs out.

but without , able prevent logout well.

need alternative solution prevent logout.

do not use lsuielement in plist. instead on launch use:

[nsapp setactivationpolicy:nsapplicationactivationpolicyaccessory]; 

i verified applicationshouldterminate: in fact called when done way.


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -