CEGUI.log wrote:19/12/2007 11:11:19 (Error) Exception: WindowManager::createWindow - A Window object with the name 'ChatTabControl__auto_TabPane__Buttons__auto_btnTabContentPane' already exists within the system.
It would appear that CEGUI is improperly auto generating a window name . I think the addTab() is trying to derive a name from the name given to the TabControl..
Here is our code:
Create the TabControl
Code: Select all
mTabControl = (CEGUI::TabControl *)CEGUI::WindowManager::getSingleton().createWindow( CEGUILOOK"/TabControlPlain", "Chat/TabControl" );
mTabControl->setInheritsAlpha ( false );
mTabControl->setAlwaysOnTop( true );
mTabControl->setVisible( true );
now, when we go to add a tab, the first tab adds with no problem however all subsequent calls crash at
mTabControl->addTab( mNewTabItem->TabWindow );
Add a tab
Code: Select all
....
sprintf( mTemp, "Chat/Tab/%lu/TabContentPane", mNewTabItem->TabNumber );
sprintf( mTabName, "TabWindow %lu", mNewTabItem->TabNumber ); // default
if ( TabName ) strcpy( mTabName, TabName );
mNewTabItem->TabWindow = (CEGUI::DefaultWindow *)CEGUI::WindowManager::getSingleton().createWindow( CEGUILOOK"/TabContentPanePlain", mTemp );
mNewTabItem->TabWindow->setFont( mNewTabItem->Font );
mNewTabItem->TabWindow->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.0f, 0.0f ), CEGUI::UDim( 0.0f, 0.0f ) ) );
mNewTabItem->TabWindow->setSize( CEGUI::UVector2( CEGUI::UDim( 1.0f, 0.0f ), CEGUI::UDim( 1.0f, 0.0f ) ) );
mNewTabItem->TabWindow->setText( mTabName );
mNewTabItem->TabWindow->setUserData( mNewTabItem );
mTabControl->addTab( mNewTabItem->TabWindow );
and here is a more complete log view:
CEGUI.LOG wrote:
19/12/2007 11:22:50 (InfL2) Assigning LookNFeel 'Origins/TabContentPanePlain' to window 'Chat/Tab/1/TabContentPane'.
19/12/2007 11:22:51 (InfL2) Window 'Chat/TabControl__auto_TabPane__Buttons__auto_btnTabContentPane' of type 'Origins/TabButton' has been created.
*** HERE ***
19/12/2007 11:22:51 (InfL2) Assigning the window renderer 'Falagard/TabButton' to the window 'Chat/TabControl__auto_TabPane__Buttons__auto_btnTabContentPane'
*** HERE ***
19/12/2007 11:22:51 (InfL2) Assigning LookNFeel 'Origins/TabButton' to window 'Chat/TabControl__auto_TabPane__Buttons__auto_btnTabContentPane'.
19/12/2007 11:22:51 (InfL2) Window 'Chat/Tab/1/MultiLineEditbox' of type 'Origins/MultiLineEditboxTransparent' has been created.
19/12/2007 11:22:51 (InfL2) Assigning the window renderer 'Falagard/MultiLineEditbox' to the window 'Chat/Tab/1/MultiLineEditbox'
19/12/2007 11:22:51 (InfL2) Assigning LookNFeel 'Origins/MultiLineEditboxTransparent' to window 'Chat/Tab/1/MultiLineEditbox'.
19/12/2007 11:22:51 (InfL2) Window 'Chat/Tab/1/MultiLineEditbox__auto_hscrollbar__' of type 'Origins/HorizontalScrollbar' has been created.
19/12/2007 11:22:51 (InfL2) Assigning the window renderer 'Falagard/Scrollbar' to the window 'Chat/Tab/1/MultiLineEditbox__auto_hscrollbar__'
19/12/2007 11:22:51 (InfL2) Assigning LookNFeel 'Origins/HorizontalScrollbar' to window 'Chat/Tab/1/MultiLineEditbox__auto_hscrollbar__'.
19/12/2007 11:22:51 (InfL2) Window 'Chat/Tab/1/MultiLineEditbox__auto_hscrollbar____auto_incbtn__' of type 'Origins/ImageButton' has been created.
19/12/2007 11:22:51 (InfL2) Assigning the window renderer 'Falagard/Button' to the window 'Chat/Tab/1/MultiLineEditbox__auto_hscrollbar____auto_incbtn__'
19/12/2007 11:22:51 (InfL2) Assigning LookNFeel 'Origins/ImageButton' to window 'Chat/Tab/1/MultiLineEditbox__auto_hscrollbar____auto_incbtn__'.
19/12/2007 11:22:51 (InfL2) Window 'Chat/Tab/1/MultiLineEditbox__auto_hscrollbar____auto_decbtn__' of type 'Origins/ImageButton' has been created.
19/12/2007 11:22:51 (InfL2) Assigning the window renderer 'Falagard/Button' to the window 'Chat/Tab/1/MultiLineEditbox__auto_hscrollbar____auto_decbtn__'
19/12/2007 11:22:51 (InfL2) Assigning LookNFeel 'Origins/ImageButton' to window 'Chat/Tab/1/MultiLineEditbox__auto_hscrollbar____auto_decbtn__'.
19/12/2007 11:22:51 (InfL2) Window 'Chat/Tab/1/MultiLineEditbox__auto_hscrollbar____auto_thumb__' of type 'Origins/HorizontalScrollbarThumb' has been created.
19/12/2007 11:22:51 (InfL2) Assigning the window renderer 'Falagard/Button' to the window 'Chat/Tab/1/MultiLineEditbox__auto_hscrollbar____auto_thumb__'
19/12/2007 11:22:51 (InfL2) Assigning LookNFeel 'Origins/HorizontalScrollbarThumb' to window 'Chat/Tab/1/MultiLineEditbox__auto_hscrollbar____auto_thumb__'.
19/12/2007 11:22:51 (InfL2) Window 'Chat/Tab/1/MultiLineEditbox__auto_vscrollbar__' of type 'Origins/VerticalScrollbar' has been created.
19/12/2007 11:22:51 (InfL2) Assigning the window renderer 'Falagard/Scrollbar' to the window 'Chat/Tab/1/MultiLineEditbox__auto_vscrollbar__'
19/12/2007 11:22:51 (InfL2) Assigning LookNFeel 'Origins/VerticalScrollbar' to window 'Chat/Tab/1/MultiLineEditbox__auto_vscrollbar__'.
19/12/2007 11:22:51 (InfL2) Window 'Chat/Tab/1/MultiLineEditbox__auto_vscrollbar____auto_incbtn__' of type 'Origins/ImageButton' has been created.
19/12/2007 11:22:51 (InfL2) Assigning the window renderer 'Falagard/Button' to the window 'Chat/Tab/1/MultiLineEditbox__auto_vscrollbar____auto_incbtn__'
19/12/2007 11:22:51 (InfL2) Assigning LookNFeel 'Origins/ImageButton' to window 'Chat/Tab/1/MultiLineEditbox__auto_vscrollbar____auto_incbtn__'.
19/12/2007 11:22:51 (InfL2) Window 'Chat/Tab/1/MultiLineEditbox__auto_vscrollbar____auto_decbtn__' of type 'Origins/ImageButton' has been created.
19/12/2007 11:22:51 (InfL2) Assigning the window renderer 'Falagard/Button' to the window 'Chat/Tab/1/MultiLineEditbox__auto_vscrollbar____auto_decbtn__'
19/12/2007 11:22:51 (InfL2) Assigning LookNFeel 'Origins/ImageButton' to window 'Chat/Tab/1/MultiLineEditbox__auto_vscrollbar____auto_decbtn__'.
19/12/2007 11:22:51 (InfL2) Window 'Chat/Tab/1/MultiLineEditbox__auto_vscrollbar____auto_thumb__' of type 'Origins/VerticalScrollbarThumb' has been created.
19/12/2007 11:22:51 (InfL2) Assigning the window renderer 'Falagard/Button' to the window 'Chat/Tab/1/MultiLineEditbox__auto_vscrollbar____auto_thumb__'
19/12/2007 11:22:51 (InfL2) Assigning LookNFeel 'Origins/VerticalScrollbarThumb' to window 'Chat/Tab/1/MultiLineEditbox__auto_vscrollbar____auto_thumb__'.
19/12/2007 11:22:51 (InfL2) Window 'Chat/Tab/2/TabContentPane' of type 'Origins/TabContentPanePlain' has been created.
19/12/2007 11:22:51 (InfL2) Assigning the window renderer 'Falagard/Default' to the window 'Chat/Tab/2/TabContentPane'
19/12/2007 11:22:51 (InfL2) Assigning LookNFeel 'Origins/TabContentPanePlain' to window 'Chat/Tab/2/TabContentPane'.
*** HERE ***
19/12/2007 11:22:54 (Error) Exception: WindowManager::createWindow - A Window object with the name 'Chat/TabControl__auto_TabPane__Buttons__auto_btnTabContentPane' already exists within the system.
*** HERE ***