News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Scripting commands : use 'Project->buildTargets'

Started by LETARTARE, August 14, 2013, 04:41:32 PM

Previous topic - Next topic

LETARTARE

In the wiki:
http://wiki.codeblocks.org/index.php?title=Scripting_commands#ProjectFile
QuotebuildTargets
is a PUBLIC class variable to retrieve the targets file.

If we write ('prjfile' is a ProjectFile) :
Quotelocal Targetsfile = prjfile.buildTargets
and after finishing with the local variable :
QuoteTargetsfile.Clear()
it may happen that the files are REMOVED from the project !

The use of a PUBLIC class variable, in that event, causes side effects.

I enclose a 'Hello.cbp' with a test script that demonstrates this problem.
Hello1.zip
I suggest a fix for r9251
implement_GetbuildTargets_r9251.patch

Thank you for your answers.
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

MortenMacFly

Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

LETARTARE

#2
thank you. Still effective !

But should we keep "wxArrayString buildTargets" user accessible ?
I think that this variable must be 'private' or 'protected'.
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'