News:

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

Main Menu

Canceling the compiler on cbEVT_COMPILER_STARTED event

Started by secks, May 13, 2009, 05:33:04 PM

Previous topic - Next topic

secks

I'm writing a plugin for the latest svn build (linux) that handles the cbEVT_COMPILER_STARTED event.  I want to be able to abort the compile (using the gcc compiler) on that event.  I have the plugin object and tried calling KillProccess on it but it does nothing.  The compiler plugin is also returning false when I call IsRunning .. Any ideas? .. Example:

void MyPlugin::OnCompilerStarted(CodeBlocksEvent& event) {
if (IsAttached()) {
if(!m_allowCompile) {
cbCompilerPlugin *plugin = (cbCompilerPlugin*)(event.GetPlugin());
if(plugin->IsRunning()) {
wxMessageBox(_("running"));
} else {
wxMessageBox(_("not running"));
}
plugin->KillProcess();
}
}
}