Menu

#786 Compiler plugin does not listen to cbEVT_BUILDTARGET_SELECTED event

Undefined
open
nobody
Bug_Report
2019-01-14
2019-01-12
bluehazzard
No

If i select a new build target from the scripting console with

GetProjectManager().GetActiveProject().SetActiveBuildTarget(_T("Debug"))

The toolbar drop down list with the actual build target is not refreshed, it stays at the same entry

Also it i hit build the actual target from the drop down menu is build and not the active target of the project. So i think the plugin does not use the GetActiveTarget function, but uses the drop down menu entry.

I think this are two bugs:
1) The compiler plugin should listen to the cbEVT_BUILDTARGET_SELECTED event and update the UI
2) The compiler plugin should always use the active target from the project and not from the drop down menu if "build" is called

Steps to reproduce:
1) Create a simple console project with two targets: Debug and Release
2) Select the Release target from the drop down menu
3) Open the scripting console
4) Enter the code line from above
5) Hit the Build button or the menu Build->Build
6) The log will show you that Release is build and not debug as expected

Discussion

  • bluehazzard

    bluehazzard - 2019-01-14

    Ok, i lookad a bit into this and found this solution. Can someone check if this is the right way to go?
    This fixes 1) and 2)

     
  • bluehazzard

    bluehazzard - 2019-01-14

    This fix will not work for non activated projects. The plugin gets the target it selects from the workspace and not from the project class on activating the project. I do not know why....

     

Log in to post a comment.