Author Topic: Canceling the compiler on cbEVT_COMPILER_STARTED event  (Read 2190 times)

Offline secks

  • Multiple posting newcomer
  • *
  • Posts: 20
Canceling the compiler on cbEVT_COMPILER_STARTED event
« on: May 13, 2009, 05:33:04 pm »
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:
Code: [Select]
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();
}
}
}
« Last Edit: May 13, 2009, 05:34:38 pm by secks »