how can I intercept when textmate shuts down ?

View: New views
5 Messages — Rating Filter:   Alert me  

how can I intercept when textmate shuts down ?

by Roberto Saccon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
http://lists.macromates.com/mailman/listinfo/textmate-plugins

Re: how can I intercept when textmate shuts down ?

by Ciarán Walsh-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
> http://lists.macromates.com/mailman/listinfo/textmate-plugins

_______________________________________________
textmate-plugins mailing list
textmate-plugins@...
http://lists.macromates.com/mailman/listinfo/textmate-plugins

Re: how can I intercept when textmate shuts down ?

by Roberto Saccon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

thanks, got it working

now I am wondering where to install my daemon.

is there any reason I should not put it at:

~/Library/Application\ Support/TextMate/Support/bin/

regards

On Dec 13, 2007 5:35 AM, Ciarán Walsh <ciawal@...> wrote:

> 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@...
> > http://lists.macromates.com/mailman/listinfo/textmate-plugins
>
> _______________________________________________
> textmate-plugins mailing list
> textmate-plugins@...
> http://lists.macromates.com/mailman/listinfo/textmate-plugins
>



--
Roberto Saccon
http://rsaccon.com
_______________________________________________
textmate-plugins mailing list
textmate-plugins@...
http://lists.macromates.com/mailman/listinfo/textmate-plugins

Re: how can I intercept when textmate shuts down ?

by Ciarán Walsh-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What is the daemon, and what does installation involve?
You should just bundle it inside the plug-in package, is there a  
reason it needs to be moved from there?

On 13 Dec 2007, at 21:09, Roberto Saccon wrote:

> thanks, got it working
>
> now I am wondering where to install my daemon.
>
> is there any reason I should not put it at:
>
> ~/Library/Application\ Support/TextMate/Support/bin/
>
> regards
>
> On Dec 13, 2007 5:35 AM, Ciarán Walsh <ciawal@...> wrote:
>> 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@...
>>> http://lists.macromates.com/mailman/listinfo/textmate-plugins
>>
>> _______________________________________________
>> textmate-plugins mailing list
>> textmate-plugins@...
>> http://lists.macromates.com/mailman/listinfo/textmate-plugins
>>
>
>
>
> --
> Roberto Saccon
> http://rsaccon.com
> _______________________________________________
> textmate-plugins mailing list
> textmate-plugins@...
> http://lists.macromates.com/mailman/listinfo/textmate-plugins

_______________________________________________
textmate-plugins mailing list
textmate-plugins@...
http://lists.macromates.com/mailman/listinfo/textmate-plugins

Re: how can I intercept when textmate shuts down ?

by Roberto Saccon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Dec 14, 2007 1:55 AM, Ciarán Walsh <ciawal@...> wrote:
> What is the daemon, and what does installation involve?
> You should just bundle it inside the plug-in package, is there a
> reason it needs to be moved from there?

oh, just was confusing things, everything fine now, thanks very much

--
Roberto Saccon
http://rsaccon.com
_______________________________________________
textmate-plugins mailing list
textmate-plugins@...
http://lists.macromates.com/mailman/listinfo/textmate-plugins