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

mysql - java.sql.SQLException Parameter index out of range (1 > number of parameters, which is 0) -

c - ALSA programming: how to stop immediately -