Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: darklordsatan on July 12, 2005, 05:38:35 am

Title: Code::Blocks' global configuration
Post by: darklordsatan on July 12, 2005, 05:38:35 am
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...
Title: Code::Blocks' global configuration
Post by: rickg22 on July 12, 2005, 05:53:40 am
With "singleton" it means "only one in memory" (per instance). The configuration values are stored in the registry which is a completely different matter.
Title: Code::Blocks' global configuration
Post by: darklordsatan on July 12, 2005, 07:08:25 am
Oh I see... then, is there any other means of storing temporary values, and not having them in the registry?
Title: Code::Blocks' global configuration
Post by: rickg22 on July 12, 2005, 07:20:21 am
not that we know of, sorry.
Title: Code::Blocks' global configuration
Post by: David Perfors on July 12, 2005, 08:57:37 pm
a dirty way :P write a textfile...
Title: Code::Blocks' global configuration
Post by: darklordsatan on July 12, 2005, 10:51:52 pm
Quote from: mispunt
a dirty way :P write a textfile...


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