CEGUICommonFileDialog

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
pabloa
Not too shy to talk
Not too shy to talk
Posts: 37
Joined: Mon Oct 03, 2005 09:52

CEGUICommonFileDialog

Postby pabloa » Wed Jan 11, 2006 17:05

I was trying understand the File Dialog, from the ogre wiki... http://www.ogre3d.org/wiki/index.php/CE ... FileDialog
but when I add al the files and copy the demo some errors appear. All of them in CEGUICommonFileDialog.h, a syntaxis error in line:

Code: Select all

   hash_map<string, _Path*> _currentPaths;


Some help!

User avatar
baxissimo
Quite a regular
Quite a regular
Posts: 60
Joined: Tue Feb 22, 2005 08:04
Location: Tokyo, JAPAN
Contact:

Re: CEGUICommonFileDialog

Postby baxissimo » Thu Jan 12, 2006 01:33

hash_map is a non-standard STL container. (Or at least it was until recently. Maybe it's official now).

Anyway, the interface is identical to std::map, only the implementation is different. So you should be able to just replace "hash_map" with "map" everywhere you see it.

The difference between the two is that hash_map stores things in a hash table so that you get expected O(1) lookup and insertion. map uses a balanced tree so lookup and insertion are O(log N). Unless the number of items in the hash_map is close to a bazillion, or the code is doing thousands of lookups per second, you probably won't notice the difference in speed at all.

User avatar
pabloa
Not too shy to talk
Not too shy to talk
Posts: 37
Joined: Mon Oct 03, 2005 09:52

Re: CEGUICommonFileDialog

Postby pabloa » Thu Jan 12, 2006 09:03

replace "hash_map" with "map" is not the solution.

User avatar
baxissimo
Quite a regular
Quite a regular
Posts: 60
Joined: Tue Feb 22, 2005 08:04
Location: Tokyo, JAPAN
Contact:

Re: CEGUICommonFileDialog

Postby baxissimo » Thu Jan 12, 2006 23:44

Oh well.

User avatar
vitefalcon
Just popping in
Just popping in
Posts: 3
Joined: Mon Jan 07, 2008 15:41

Postby vitefalcon » Tue Jul 15, 2008 13:11

I don't know if you've already solved this..
The real problem is that MS has put hash_map to a different namespace called stdext.

Doing this should help you solve it...

Code: Select all

#include <hash_map>
using namespace stdext;


Hope this helps someone.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests