[Resloved]appear error when adds ListHeader

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

cty41
Just popping in
Just popping in
Posts: 3
Joined: Mon Nov 16, 2009 11:03

[Resloved]appear error when adds ListHeader

Postby cty41 » Mon Nov 16, 2009 11:28

Hi, everyone.I am new to CEGUI and now using CELayoutEditor to create GUI.
When I wanna add a ListHeader to listbox ,CELayoutEditor throws a exception

Code: Select all

Description: Error
Exception Location: EditorDocument::GetRelevantProperties
Exception Message: ListHeader::getSortSegment - Sort segment was invalid!  (No segments are attached to the ListHeader?)
Exception Filename: ..\..\..\src\elements\CEGUIListHeader.cpp
Exception Line: 165
16/11/2009 18:56:09 (Std)    EditorDocument::SelectWindow - Newselected: 'DefaultGUISheet/FrameWindow/RoomListbox/ListHeader'


Sorry for trouble you. But I am really unfamiliar with these list widget.I check the source code,found the exception come from here.But I don't know why?

Code: Select all

/*************************************************************************
   Return the sort-key segment.
*************************************************************************/
ListHeaderSegment& ListHeader::getSortSegment(void) const
{
   if (!d_sortSegment){
      throw   InvalidRequestException("ListHeader::getSortSegment - Sort segment was invalid!  (No segments are attached to the ListHeader?)");
   }
   else{
      return *d_sortSegment;
   }
}

And I searched the google and forums ,but came out no results(only serched a same resulthttp://www.cegui.org.uk/phpBB2/viewtopic.php?f=7&t=3406)
Are there any people know where is my mistake?Any help will be helpful!Thank you@0@
Last edited by cty41 on Wed Nov 18, 2009 00:56, edited 1 time in total.

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: appear error when adds ListHeader

Postby Jamarr » Mon Nov 16, 2009 17:17

You need to post your CEGUI.log file so we know what version and configuration you are using. In regards to your problem, you should post the xml-layout that you are using so we can verify the window and layout information, and you should also post the relevant code (your code) that is resulting in the exception. Posting the callstack at the point where the exception is thrown would also be beneficial.

From the little information you've given, it is hard to say what is causing the exception. From what I can tell, adding a header to the MultiColumnList has nothing to do with this exception. Judging by the exception, it looks the code is trying to access the header used for (user) sorting, but the (user) sort-header has not been assigned.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

cty41
Just popping in
Just popping in
Posts: 3
Joined: Mon Nov 16, 2009 11:03

Re: appear error when adds ListHeader

Postby cty41 » Tue Nov 17, 2009 00:07

Thx.
Here is my log file.http://pastebin.com/m3f24f707.My CELayoutEditor version is 0.6.2.
Here is my layout file:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<GUILayout >
    <Window Type="DefaultWindow" Name="DefaultGUISheet" >
        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
        <Window Type="AquaLook/FrameWindow" Name="DefaultGUISheet/FrameWindow" >
            <Property Name="Text" Value="Join Room" />
            <Property Name="TitlebarFont" Value="BlueHighway-12" />
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
            <Property Name="TitlebarEnabled" Value="True" />
            <Property Name="UnifiedAreaRect" Value="{{0.148438,0},{0.111979,0},{0.845703,0},{0.851563,0}}" />
            <Window Type="AquaLook/Button" Name="DefaultGUISheet/FrameWindow/JoinButton" >
                <Property Name="Text" Value="Join" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.0469853,0},{0.190352,0},{0.147612,0},{0.244785,0}}" />
            </Window>
            <Window Type="AquaLook/Button" Name="DefaultGUISheet/FrameWindow/RefreshButton" >
                <Property Name="Text" Value="Refresh" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.049434,0},{0.252282,0},{0.150061,0},{0.306715,0}}" />
            </Window>
            <Window Type="AquaLook/Button" Name="DefaultGUISheet/FrameWindow/CancelButton" >
                <Property Name="Text" Value="Cancel" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.0469853,0},{0.317471,0},{0.147613,0},{0.371904,0}}" />
            </Window>
            <Window Type="AquaLook/MultiColumnList" Name="DefaultGUISheet/FrameWindow/MultilineList" >
                <Property Name="Font" Value="BlueHighway-12" />
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.266387,0},{0.155634,0},{0.944958,0},{0.923239,0}}" />
            </Window>
        </Window>
    </Window>
</GUILayout>

I only use CELayoutEditor, and don't know how to post exception callstack.
I just tried to add a listHeader to MultiColumnList,do I need set something in MultiColumnList?
Last edited by cty41 on Tue Nov 17, 2009 01:54, edited 1 time in total.

User avatar
DtD
Just popping in
Just popping in
Posts: 14
Joined: Fri Oct 09, 2009 18:54
Location: Kansas, United States
Contact:

Re: appear error when adds ListHeader

Postby DtD » Tue Nov 17, 2009 00:24

You can upload your log file to http://www.pastebin.com/

~DtD

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: appear error when adds ListHeader

Postby Jamarr » Tue Nov 17, 2009 16:50

Apparently this is a known issue, but it has been fixed. Basically, You need to use a newer version of the CELayoutEditor. There is a work around, which is to manually add the definitions to the layout file using a text editor.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

cty41
Just popping in
Just popping in
Posts: 3
Joined: Mon Nov 16, 2009 11:03

Re: appear error when adds ListHeader

Postby cty41 » Wed Nov 18, 2009 00:56

Thank a lot!!I will try to add listheader manually


Return to “Help”

Who is online

Users browsing this forum: No registered users and 23 guests