Author Topic: Code::Blocks' global configuration  (Read 7316 times)

darklordsatan

  • Guest
Code::Blocks' global configuration
« 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...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Code::Blocks' global configuration
« Reply #1 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.

darklordsatan

  • Guest
Code::Blocks' global configuration
« Reply #2 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?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Code::Blocks' global configuration
« Reply #3 on: July 12, 2005, 07:20:21 am »
not that we know of, sorry.

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Code::Blocks' global configuration
« Reply #4 on: July 12, 2005, 08:57:37 pm »
a dirty way :P write a textfile...
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

darklordsatan

  • Guest
Code::Blocks' global configuration
« Reply #5 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