Request, in C++ I often switch between DEBUG and RELEASE configuration.
However, what configuration I have does not show on screen (I have to go
into menus to see it) and the way to change it is not fast.
Would it be possible to add a combobox to your editor toolbar that lists
the configurations, shows the current one and allows change ??
Seems IDE does not provide this interface to control, or we just not found.:L
We'll do the research.
Reply #2 Passion's post
Hi, Passion , I think the IOTABuildConfiguration interface in Toolsapi.pas of Delphi 2009 could do the work. Maybe you can try it. Sorry I do not have much leisure time otherwise I will be like do it by myself:Q .
Thanks for the hint, I'll check it.:handshake
Build configuration related features now has been supported by our CnWizards' Pascal script, you can refer to the PSDemo\BuildConfiguration.pas to write a script and run it to switch active configuration.
This feature will be in our latest nightly build 0.9.8.479 and later. [url]http://www.cnpack.org/downbuilds.php[/url]
Reply #5 Passion's post
Hi, tried it and it works well !
However, how do i place a combobox on screen (in a toolbar?) that I can fill with the current configs ?
And how do I know when the combobox is changed and how do I update the combobox when the configs are changed by the builtin dialog.
Can I do stuff like this with scripts or do I need your help ?
Unfortunately, though we can place an combobox under Toolbar or IDE Mainform using Pascal Script, it's hard or impossible to set combobox's events to our script. They're different running environment. So I think we can only write a script for manual switching, not "visual" style like you described.:L
Powered by Discuz! Archiver 5.0.0
© 2001-2006 Comsenz Inc.
Reply #7 Passion's post
OK, but is it possible to at least show the current config, that is can there be an event that fires when the configuration changes ? Want to place the text somewhere (on the Toolbar would be perfect).
Did this really simple script and it works the first time it runs (runs on ofnActiveProjectChange). Traps the second time....
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
BC := CnOtaGetActiveProjectOptionsConfigurations(nil);
if BC <> nil then
// Bar := GetStatusBarFromEditor(GetCurrentEditControl);
// Bar.SimplePanel := True;
// Bar.SimpleText := BC.GetActiveConfiguration.GetName;