Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: puneet_m on August 27, 2007, 08:44:46 pm

Title: ConfigManager in main.cpp
Post by: puneet_m 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
Title: Re: ConfigManager in main.cpp
Post by: Biplab 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
Title: Re: ConfigManager in main.cpp
Post by: puneet_m 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?
Title: Re: ConfigManager in main.cpp
Post by: Ceniza 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.
Title: Re: ConfigManager in main.cpp
Post by: Biplab on August 27, 2007, 09:26:08 pm
Ceniza explained what I was about to post. :)
Title: Re: ConfigManager in main.cpp
Post by: dje 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
Title: Re: ConfigManager in main.cpp
Post by: puneet_m on August 27, 2007, 09:43:32 pm
It was a hidden folder, and I didn't do a search on hidden folders ... :(