Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: Larri on November 23, 2007, 04:49:33 am

Title: How Execute my plugin when I save?
Post by: Larri on November 23, 2007, 04:49:33 am
Hello,  I have a plugin and I install it. How can I execute the plugin when I save all the project (shift+ctrl+S).

I Want to say: every time that I save all (shift+Ctrl+S) I want to execute my plugin.

         THANKS

Title: Re: How Execute my plugin when I save?
Post by: MortenMacFly on November 23, 2007, 08:36:34 am
I Want to say: every time that I save all (shift+Ctrl+S) I want to execute my plugin.
If you really mean per-file: Hook into the cbEVT_EDITOR_SAVE event.
If you mean when you save your project: Hook into the cbEVT_PROJECT_SAVE event.
With regards, Morten.
Title: Re: How Execute my plugin when I save?
Post by: alfre on November 28, 2007, 09:20:23 pm
Where can I find the cbEVT_EDITOR_SAVE event and the cbEVT_PROJECT_SAVE event.Thanks again
Title: Re: How Execute my plugin when I save?
Post by: artoj on November 28, 2007, 09:28:50 pm
Where can I find the cbEVT_EDITOR_SAVE event and the cbEVT_PROJECT_SAVE event.Thanks again

src/include/sdk_events.h
Title: Re: How Execute my plugin when I save?
Post by: alfre on November 28, 2007, 11:06:21 pm
(Sorry my english)

Sorry I dont explain me so well,  I want  to steal this event. Example : when cbEVT_PROJECT_SAVE event execute, do something(Execute my pluggin).

 The idea is : Execute my pluggin when I save. How can I do that.


                                    THANKS for your time
Title: Re: How Execute my plugin when I save?
Post by: mandrav on November 29, 2007, 09:15:45 am
Sorry I dont explain me so well,  I want  to steal this event. Example : when cbEVT_PROJECT_SAVE event execute, do something(Execute my pluggin).

 The idea is : Execute my pluggin when I save. How can I do that.

Code::Blocks SDK events (http://wiki.codeblocks.org/index.php?title=Code::Blocks_SDK_events)
Title: Re: How Execute my plugin when I save?
Post by: alfre on November 30, 2007, 10:30:04 pm
(Sorry my English)

I try to do it, but don't work. Maybe I don't understand  the article "Code::Blocks SDK events", if you have any example or everything else I appreciate that.

The Errors are:

borrar1/alfre.cpp:54:     error:       ‘class Manager’ has no member named ‘RegisterEventSink’
borrar1/alfre.cpp:54:     error:        expected type-specifier before ‘cbFunctorBase’
borrar1/alfre.cpp:54:     error:        expected `)' before ‘cbFunctorBase’
borrar1/alfre.cpp:54:     error:        expected primary-expression before ‘>’ token



                                          THANKS for your time