Hi,
Okay, no problem with the NOs since I now know why i want the exceptions to happen.
As to answer the question about the adding twice the same tab. The stupid thing is as follow:
I have 1 tab controller, one of the tab is used for debugging purposes, so I want to hide / show the tab depending on an option somewhere else.
So first I add the window to the tab controller, works fine. However I then want to actually know in which state is the window (added or not to the tab controller) so that when the option is unchecked it removes the window from the tab controller and I wanted to see if the window could actually be removed or added before actually doing the add or remove.
Thus I embarked on a journey to make my method to actually check if the window was contained in the TabController. And that is where I actually started getting problems because when I try to do: TC:getChildrenAtIdx(i) and go through all of them I never find my window even if it is actually added. Which is very frustrating. And this is why i posted all the stuff above ^^
As for isChild() and isRecursiveChild() I do not know if I can actually access them at the moment, though I can make the request to be allowed to.
Anyway, I think I found a solution to my problem while writing this post... actually look at the parent of my window and see if said parent is the tab controller! Instead of trying to see if the window is actually the child of the tab controller
Oh, and one last thing I forgot to mention I guess... is that I am accessing CEGUI from LUA... not directly. (and thus I am very restricted regarding the API available to me)
Thanks for the information

and keep up the good work
Regards!
Info:
This is what I tried for example
Code: Select all
if ( CPT_CAS_DebugTabWindow:getParent() == CPT_CA_TabHolder ) then
CPT_CA.RemoveTab(CPT_CAS_DebugTabWindow);
else
CPT_CA.AddTab(CPT_CAS_DebugTabWindow);
end
And CPT_CA.AddTab and RemoveTab are:
Code: Select all
-- ===============================================
function CPT_CA.AddTab(tabWindow) -- need to work on how to put the tab in the correct order
CPT_CA_TabHolder:addTab(tabWindow);
-- TODO: Put TAB in specific order
end
-- ===============================================
function CPT_CA.RemoveTab(tabWindow) -- this is used to remove tabs from the tab holder mainly used when switching from no alliance to alliance and the reverse
CPT_CA_TabHolder:removeTab(tabWindow:getID());
end