News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Code::Blocks' global configuration

Started by darklordsatan, July 12, 2005, 05:38:35 AM

Previous topic - Next topic

darklordsatan

Quote from: Wiki
The global configuration object is a singleton, meaning that only one exists for the program's lifetime.

Well, it seems like not. Ive been trying to write a variable to the global configuration, and everytime I open code::blocks and try to read the value of that variable, its there, I mean, If I set a given value, everytime I read it, it wont return "default" but rather the last value set, why? I mean, isnt the global config supossed to exist only while the execution of the program, then why is it being there even when I reopen the app?

I think Ill make it clearer in case its confusing:
1. I open a code::blocks instance.
2. I write a variable in the global configuration. I read it and everything goes fine.
3. I close code::blocks
4. I open code::blocks again (new instance), then I try to read the variable in the global configuration, and instead of getting something like "default" as stated on the wiki (default would mean Its not in the global config, which is what SHOULD happen), I get the value I just wrote in the first instance...

rickg22

With "singleton" it means "only one in memory" (per instance). The configuration values are stored in the registry which is a completely different matter.

darklordsatan

Oh I see... then, is there any other means of storing temporary values, and not having them in the registry?

rickg22


David Perfors

OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

darklordsatan

Quote from: mispunta dirty way :P write a textfile...

Yeah, I tried that one, but its too "underground"  :D