[TxMt Plugins] how can I intercept when textmate shuts down ?

Ciarán Walsh ciawal at gmail.com
Thu Dec 13 07:35:48 UTC 2007


Use this in -initWithPlugInController:

[[NSNotificationCenter defaultCenter] addObserver:self  
selector:@selector(applicationWillTerminate:)  
name:NSApplicationWillTerminateNotification object:nil]

then add a method to your controller:

- (void)applicationWillTerminate:(NSNotification*)notification

On 13 Dec 2007, at 01:17, Roberto Saccon wrote:

> I made some progress with my Erlang background server which gets
> started with a textmate plugin.
>
> it basically works, just some minor details are missing, one of them  
> is:
>
> how can I intercept when textmate shuts down ? (I need to shutdown  
> my dameon)
>
> does there any specific method get called ALWAYS when textmate exits,
> so I can apply MethodSwizzeling or is there any other "recommended
> apporach" ?
>
> regards
> -- 
> Roberto Saccon
> http://rsaccon.com
> _______________________________________________
> textmate-plugins mailing list
> textmate-plugins at lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate-plugins




More information about the textmate-plugins mailing list