Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Scripting commands : use 'Project->buildTargets'
(1/1)
LETARTARE:
In the wiki:
http://wiki.codeblocks.org/index.php?title=Scripting_commands#ProjectFile
--- Quote ---buildTargets
--- End quote ---
is a PUBLIC class variable to retrieve the targets file.
If we write ('prjfile' is a ProjectFile) :
--- Quote ---local Targetsfile = prjfile.buildTargets
--- End quote ---
and after finishing with the local variable :
--- Quote ---Targetsfile.Clear()
--- End quote ---
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.
--- Code: ---Hello1.zip
--- End code ---
I suggest a fix for r9251
--- Code: ---implement_GetbuildTargets_r9251.patch
--- End code ---
Thank you for your answers.
MortenMacFly:
Applied in SVN. Thank you! :-)
LETARTARE:
thank you. Still effective !
But should we keep "wxArrayString buildTargets" user accessible ?
I think that this variable must be 'private' or 'protected'.
Navigation
[0] Message Index
Go to full version