Author Topic: ConfigManager in main.cpp  (Read 6876 times)

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
ConfigManager in main.cpp
« on: August 27, 2007, 08:44:46 pm »
In the function DoOnFileOpen(bool bProject), there is a  statement

ConfigManager* mgr = Manager::Get()->GetConfigManager(_T("app"));

Can anyone explain as to what does this function do?

Puneet

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: ConfigManager in main.cpp
« Reply #1 on: August 27, 2007, 08:54:34 pm »
It fetches the instance of ConfigManager. Download the SDK documentation from the following link. That will be helpful for you.
Quote
http://prdownload.berlios.de/codeblocks/codeblocks_sdk_doc_r4395.chm
Be a part of the solution, not a part of the problem.

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: ConfigManager in main.cpp
« Reply #2 on: August 27, 2007, 09:18:19 pm »
Thanks Biplab. I got the point that it is creating the instance, but what is the use of passing a namespace argument in the function GetConfigManager.

Also there are couple of statements saying this -->

mgr->Read(_T("/file_dialogs/file_new_open/filter"));
mgr->Read(_T("/file_dialogs/file_new_open/directory"), Path);

But I do not see any such folder. Where are these folders located?

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: ConfigManager in main.cpp
« Reply #3 on: August 27, 2007, 09:24:01 pm »
Those aren't folders. That's used to read configuration values. Check default.conf (Code::Blocks' configuration file) to get an idea.

P.S.: default.conf is a XML file.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: ConfigManager in main.cpp
« Reply #4 on: August 27, 2007, 09:26:08 pm »
Ceniza explained what I was about to post. :)
Be a part of the solution, not a part of the problem.

Offline dje

  • Lives here!
  • ****
  • Posts: 682
Re: ConfigManager in main.cpp
« Reply #5 on: August 27, 2007, 09:36:00 pm »
%USERPROFILE%\Application Data\codeblocks on XP
You don't know how to search a file on a disk  :wink: ?

Dje

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: ConfigManager in main.cpp
« Reply #6 on: August 27, 2007, 09:43:32 pm »
It was a hidden folder, and I didn't do a search on hidden folders ... :(