Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: darklordsatan on July 12, 2005, 05:38:35 am
-
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...
-
With "singleton" it means "only one in memory" (per instance). The configuration values are stored in the registry which is a completely different matter.
-
Oh I see... then, is there any other means of storing temporary values, and not having them in the registry?
-
not that we know of, sorry.
-
a dirty way :P write a textfile...
-
a dirty way :P write a textfile...
Yeah, I tried that one, but its too "underground" :D