Trouble finding windows in 0.6.2

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

kripken
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Aug 04, 2008 10:05

Trouble finding windows in 0.6.2

Postby kripken » Thu Dec 04, 2008 17:41

I've run into the following problem when migrating from 0.6.1 to 0.6.2. When I do "layout:getChild" (from Lua) to get the edit box listed here, it fails:

Code: Select all

<GUILayout >
    <Window Type="DefaultWindow" Name="Root" >
        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />

        <Window Type="MainLook/FrameWindow" Name="Login/MainWindow" >
            <Property Name="Text" Value="Log In" />
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />

            <Property Name="TitlebarEnabled" Value="True" />
            <Property Name="CloseButtonEnabled" Value="False" />
            <Property Name="SizingEnabled" Value="False"/>

            <Property Name="UnifiedAreaRect" Value="{{0.3,0},{0.1,0},{0.7,0},{0.4,0}}" />


            <Window Type="MainLook/Editbox" Name="Login/MainWindow/Username" >
                <Property Name="Text" Value="" />
                <Property Name="MaxTextLength" Value="20" />
                <Property Name="UnifiedAreaRect" Value="{{0.45,0},{0.23,0},{0.9,0},{0.37,0}}" />

            </Window>

[...]

I can get "Login/MainWindow", the parent window, but "Login/MainWindow/Username" fails as if the window doesn't exist. Now, if I move that editbox up one level - in parallel to "Login/MainWindow" - then I can find it. So, the problem appears to be that children beyond a certain level are not accessible, somehow.

Note that the exact same file works fine in 0.6.1. Has how the getChild/getWindow functions operate changed between 0.6.1 and 0.6.2? (I don't see a mention in the changelog, but perhaps I'm not looking for the right thing)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Thu Dec 04, 2008 18:43

Hi,

Yes the behaviour has been restored to it's original intended function (looking for directly attached children only). A new function Window::getChildRecursive has been added for the recursive / 'deep search' cases.

ChangeLog wrote:Bug Fix: The Window::getChild(const CEGUI::String&) function was incorrectly made recursive after the 0.5.x series of releases. This fix restores the correct behaviour and adds a Window::getChildRecursive(const CEGUI::String&) function for the highly expensive recursive case. See: http://www.cegui.org.uk/mantis/view.php?id=237


HTH and sorry for the inconvenience.

CE.

kripken
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Mon Aug 04, 2008 10:05

Postby kripken » Thu Dec 04, 2008 19:55

CrazyEddie wrote:Hi,

Yes the behaviour has been restored to it's original intended function (looking for directly attached children only). A new function Window::getChildRecursive has been added for the recursive / 'deep search' cases.

ChangeLog wrote:Bug Fix: The Window::getChild(const CEGUI::String&) function was incorrectly made recursive after the 0.5.x series of releases. This fix restores the correct behaviour and adds a Window::getChildRecursive(const CEGUI::String&) function for the highly expensive recursive case. See: http://www.cegui.org.uk/mantis/view.php?id=237


HTH and sorry for the inconvenience.

CE.

Thanks for the quick response, that was indeed the issue. A quick replace (of around 100 changes :) ) and now things appear to work ok.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests