Page 1 of 1

[BUG] Window names missing slash (/) after prefix

Posted: Tue Jul 26, 2011 04:06
by Leftium
Repro steps:
1. Run Python port of Falagard demo with immediate mode
2. Type "WindowManager.getSingleton().DEBUG_dumpWindowNames('LEFTIUM')" into console and press [ENTER]
3. Inspect CEGUI.log

OR

1. Modify FalagardDemo1 to call WindowManager.getSingleton().DEBUG_dumpWindowNames("LEFTIUM")
2. Run
3. Inspect CEGUI.log

Expected results:
- Window names have slash (/) between 'Demo' prefix and rest of window name
- Example: Demo/Vanilla/Console

Actual results:
- Window names missing slash (/) between 'Demo' prefix and rest of window name
- Example: DemoVanilla/Console

Code: Select all

26/07/2011 12:54:17 (Std)    WINDOW NAMES DUMP (LEFTIUM)
26/07/2011 12:54:17 (Std)    -----------------
26/07/2011 12:54:17 (Std)    Window : bg
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console/Submit
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console/Editbox
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console/History
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console__auto_titlebar__
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console__auto_closebutton__
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console/History__auto_hscrollbar__
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console/History__auto_vscrollbar__
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console/History__auto_hscrollbar____auto_thumb__
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console/History__auto_vscrollbar____auto_thumb__
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console/History__auto_hscrollbar____auto_decbtn__
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console/History__auto_hscrollbar____auto_incbtn__
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console/History__auto_vscrollbar____auto_decbtn__
26/07/2011 12:54:17 (Std)    Window : DemoVanilla/Console/History__auto_vscrollbar____auto_incbtn__
26/07/2011 12:54:17 (Std)    -----------------


Comments:
- This probably repros with the C++ version of CEGUI, too, but untested.
- Possibly cause of Function WindowManager::getWindow won't work

Environment:

Code: Select all

26/07/2011 02:08:32 (Std)    ---- Version 0.7.5 (Build: Nov 19 2010 Microsoft Windows MSVC++ 9.0 32 bit) ----
26/07/2011 02:08:32 (Std)    ---- Renderer module is: CEGUI::OpenGLRenderer - Official OpenGL based 2nd generation renderer module.  TextureTarget support enabled via FBO extension. ----
26/07/2011 02:08:32 (Std)    ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
26/07/2011 02:08:32 (Std)    ---- Image Codec module is: SILLYImageCodec - Official SILLY based image codec ----
26/07/2011 02:08:32 (Std)    ---- Scripting module is: None ----

Re: [BUG] Window names missing slash (/) after prefix

Posted: Tue Jul 26, 2011 16:43
by Jamarr
You did not really specify which aspect you thought was buggy - the prefix code not automatically appending a "/", or the client code supplying "Demo/" instead of "Demo" as a prefix? In a way these results actually help to clarify CEGUI's current approach to window-naming - it is entirely your responsibility.

The window-naming convention in CEGUI takes a global, non-interference naming approach. In other words, the relative-naming you think you see is just a farce. For example, the name "Vanilla/Console/Editbox" is the literal name of that single Editbox widget - that name is manually composed by the author of the Layout (see .layout file). As such, CEGUI cannot blindly assume the author is using a "/" hierarchy naming-convention. The client could very well be using a "-" hierarchy style, or may not even use a hierarchical style.

Also, the naming-convention CEGUI uses will be changed (imo improved) in v0.8. The "/" hierarchy style will be enforced. In this case, I would say it makes more sense for the prefix-code to automatically append a "/".