News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

ConfigManager in main.cpp

Started by puneet_m, August 27, 2007, 08:44:46 PM

Previous topic - Next topic

puneet_m

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

Biplab

It fetches the instance of ConfigManager. Download the SDK documentation from the following link. That will be helpful for you.
Quotehttp://prdownload.berlios.de/codeblocks/codeblocks_sdk_doc_r4395.chm
Be a part of the solution, not a part of the problem.

puneet_m

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?

Ceniza

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.

Biplab

Ceniza explained what I was about to post. :)
Be a part of the solution, not a part of the problem.

dje

%USERPROFILE%\Application Data\codeblocks on XP
You don't know how to search a file on a disk  :wink: ?

Dje

puneet_m

It was a hidden folder, and I didn't do a search on hidden folders ... :(