News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How Execute my plugin when I save?

Started by Larri, November 23, 2007, 04:49:33 AM

Previous topic - Next topic

Larri

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


MortenMacFly

Quote from: Larri on November 23, 2007, 04:49:33 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

alfre

Where can I find the cbEVT_EDITOR_SAVE event and the cbEVT_PROJECT_SAVE event.Thanks again

artoj

Quote from: 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

src/include/sdk_events.h

alfre

(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

mandrav

Quote from: alfre on November 28, 2007, 11:06:21 PM
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
Be patient!
This bug will be fixed soon...

alfre

#6
(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