Author Topic: Setting PreferredTarget  (Read 3037 times)

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Setting PreferredTarget
« on: May 29, 2012, 02:51:25 am »
I just grabbed r.8020 as I'm stoked that the active project stuff was moved out of the workspace file (I've been waiting a long time for this).  One thing I'm not sure of though, other than modifying the workspace.layout file, how do I set the PreferredTarget?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5464
Re: Setting PreferredTarget
« Reply #1 on: May 29, 2012, 07:18:58 am »
you don't set it yourself, the system does that by itself.

Quote from the original patch maker :
CB currently changes the active build target whenever the active project is changed (if the newly activated project has a different active target).  This is confusing and error prone as the user isn't expecting the setting that he/she made to be changed without his/her knowledge.  To address this, this patch introduces the concept of a "preferred target".  Whenever the user selects a new build target the selection is saved internally as the "preferred target".  When the user changes the active project, CB will attempt to keep the "preferred target" active.  If the newly activated project doesn't have a target with the same name, its last active target is re-activated.  The "preferred target" is also saved in the new "workspace layout" file and re-used the next time the workspace is loaded.

This patch also prevents CB from listing build targets that are not supported on the current platform from appearing in the drop down box or the menu.  (Note: If the active project does not have any target that supports the current platform, the target list will be empty.)