Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Pecan on September 13, 2009, 03:47:10 pm
-
When I attempt to edit the Global compiler settings, I get the Abort/Retry/Ignore message.
MSW XP sp2 SVN 5751.
(http://img147.imageshack.us/img147/6469/shot0012.png)
-
Confirmed on linux too.
Only happens (at least for me), if I add a custom-variable with a name not starting with a letter .
It happens because the name of the variable is used as key, when stored in default.conf .
configmanager.cpp tests for illegal characters as first letter of the key, and if it founds one it throws an exception.
I think we should either check the variable-name directly after the user added it in compiler-config-dialog or change the way we store it.
But the second would of course lead to changes in conf-file format and to incompatibilities with the actual version.
Any other ideas ?
By the way the same problem might happen at other places, where the user can edit the name of a key directly (if such keys exist).
-
configmanager.cpp tests for illegal characters as first letter of the key, and if it founds one it throws an exception.
Well - maybe a trupid question, but why is "_" an illegal character, even for a key?
-
configmanager.cpp tests for illegal characters as first letter of the key, and if it founds one it throws an exception.
Well - maybe a trupid question, but why is "_" an illegal character, even for a key?
Don't know, it's implemented this way, only the first letter is tested. Might be a (Tiny-)XML restriction.
I did not dig into this deeper (it was a little late yesterday).
-
Don't know, it's implemented this way, only the first letter is tested. Might be a (Tiny-)XML restriction.
Saw that, too now. Well I thinks it's a bug in configmanager cause "_" even as a starter is valid XML. I'm pretty sure tinyXML will accept that, too (will try anyways...) - so I suppose to fix configmanager. However - it won't fix the crash if the user does enter something invalid there... so some more thoughts on that are welcome. Probably Thomas has an idea - he's the godfather of configmanager IIR... ;-)