Page 1 of 1

[Falagard]Unable to create a FrameWindow

Posted: Wed Jul 19, 2006 13:37
by jackbenoit
Hi!

I'm a beginner in CEGUI and I just wanted to try to create a FrameWindow, using Falagard.

So, here is my C++ code :

Code: Select all

CEGUI::OpenGLRenderer* myRenderer = NULL;
myRenderer = new CEGUI::OpenGLRenderer( 0 );
new CEGUI::System( myRenderer );

CEGUI::SchemeManager::getSingleton().loadScheme( "datafiles/schemes/VanillaSkin.scheme" );
CEGUI::System::getSingleton().setDefaultMouseCursor( "Vanilla-Images", "MouseArrow" );
         
CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton();
CEGUI::Window* myRoot = wmgr.createWindow( "DefaultWindow", "root" );
CEGUI::System::getSingleton().setGUISheet( myRoot );

CEGUI::FrameWindow* fWnd = (CEGUI::FrameWindow*)wmgr.createWindow( "Vanilla/FrameWindow", "FrameWindow" );


But the program crashes when I launch it!!! :?
Here is the end of CEGUI.log :

Code: Select all

Creating falagard mapping for type 'Vanilla/StaticImage' using base type 'Falagard/StaticImage' and LookN'Feel 'Vanilla/StaticImage'.
19/07/2006 15:14:59 (InfL1)   Creating falagard mapping for type 'Vanilla/StaticText' using base type 'Falagard/StaticText' and LookN'Feel 'Vanilla/StaticText'.
19/07/2006 15:14:59 (InfL1)   Creating falagard mapping for type 'Vanilla/Listbox' using base type 'Falagard/Listbox' and LookN'Feel 'Vanilla/Listbox'.
19/07/2006 15:14:59 (InfL1)   Creating falagard mapping for type 'Vanilla/MultiLineEditbox' using base type 'Falagard/MultiLineEditbox' and LookN'Feel 'Vanilla/MultiLineEditbox'.
19/07/2006 15:14:59 (Error)   Exception: WindowManager::getWindow - A Window object with the name 'rameWindow


Everything before is fine, and OpenGL is initialized.

So, if I understand well, it can't create a window of name FrameWindow, because this Window doesn't exist? :?

Can anyone help me?

PS : I'm pretty sure this problem is really a stupid thing, don't hit me! :oops: :lol:

Posted: Wed Jul 19, 2006 14:05
by Rackle
From your log:

WindowManager::getWindow - A Window object with the name 'rameWindow

You seem to be calling getWindow() and passing it a name of "rameWindow" rather than "FrameWindow". Notice the missing F.

Posted: Wed Jul 19, 2006 14:16
by jackbenoit
I saw the log, but I never call getWindow(), and I searched in my code, I've never write "rameWindow"! This is is the most surprising for me too!!

All C++ code that uses CEGUI in my program is shown above!! There is nothing more!

I've noticed the error too, but I don't know where this comes from.... This drives me crazy!!! :lol:

I forgot one thing : it crashes on createWindow(...) :?

Posted: Thu Jul 20, 2006 10:27
by jackbenoit
Ok, I rebuild CEGUI projects, and I don't have this error any more....
So, except I don't have anyhting displayed on my screen, it's ok!

Posted: Fri Jul 21, 2006 08:26
by alex
you have to add yor FrameWindow as a child to the root window, you have set as active sheet:
myRoot->addChildWindow(fWnd);

else your window is just a ghost in the cegui world:-)

everything you want to see in cegui must be a child or deeper subchild of the window you set as the active sheet, or the active sheet itself. so you can even set fWnd as active sheet to have them same effect with your current code.

good luck