User forums > Using Code::Blocks
</envars> being added to project file
MortenMacFly:
This has already been reported in another topic. I asked to give me steps to reproduce as this never happened to me. I got no answer so far. How to achive this?
With regards, Morten.
MortenMacFly:
I doubt it's my fault, here is the code responsible for saving:
--- Code: --- TiXmlElement* node = elem->FirstChildElement("envvars");
if (!node)
node = elem->InsertEndChild(TiXmlElement("envvars"))->ToElement();
node->Clear();
if (!m_ProjectSets[project].IsEmpty())
node->SetAttribute("set", cbU2C(m_ProjectSets[project]));
--- End code ---
Notice that it is checked whether the node exists. But please prove mw wrong...?! :?: :?: :?:
Might this be possibly related to the changes Yiannis did in 4332?
With regards, Morten.
killerbot:
what I did : just adjust some setting of the project. Will try to find a test case for reproduction.
killerbot:
just reproduced it, this is what I did :
(tested on linux) :
0) in CB create new console project, build it and close cb
==>
--- Quote --- <Extensions>
<envvars />
<code_completion />
<debugger />
</Extensions>
--- End quote ---
1) open CB, and open the project (I did that by drag and drop from konqueror to CB [no idea if this is a required action for reproduction])
2) Project properties : build targets : I changed for the Debug target the Platforms (unticked : windows)
3) File menu : save project, close cb
==>
--- Quote --- <Extensions>
<envvars />
<code_completion />
<debugger />
<envvars />
</Extensions>
--- End quote ---
4) do the same thing : Project properties etc, an tick Windows back on, then file menu save project, close cb
==>
--- Quote --- <Extensions>
<envvars />
<code_completion />
<debugger />
<envvars />
<envvars />
</Extensions>
--- End quote ---
EDIT : rev 4370
MortenMacFly:
Thanks Lieven!
--- Quote from: killerbot on August 13, 2007, 06:50:11 pm ---just reproduced it, this is what I did :
[...]
EDIT : rev 4370
--- End quote ---
Did that under Windows and it worked like a charm - no duplicate nodes. Could you try under Windows, too please?!
Unfortunetely my Linux environment is broken (asks me to provide wx26 libs after I have removed them and updated to wx28). So I cannot test it currently under Linux until I have re-installed Ubuntu.
But I would really wonder why the hell this should be platform dependend...?!?!?! And in addition: CC uses quite the very same code - so why doesn't this happen for CC, too?!
With regards, Morten.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version