I am running a program that first displays some gui like TabControl with tabs and some buttons.
After sometime , I remove these GUI elements using "remove()" call.
But immediately after that, I again create new tabcontrol and some buttons.
But this time I see that the GUI seems to be hanged. I can see the GUI elements but I cant see the button press or tab change whenever I try to do by pressing mouse left-lick.
Could you please tell whats the problem?
GUI hangs
Sorry, we need code to be able to reproduce the problem. It sounds like some focus problem, for example you might have accidentally left an invisible element on top or something like that. Or it could be any other problem in your code or even in engine code. But we can't really help unless you post code.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
hi,
i have kind of the same problem. when i try to remove gui elements the gui freezes.
here my code:
EDIT: i found out, that this for loop is not terminating. does the iterator maybe screws it all up? when i leave "window->removeChild((*it));" out, the iterator runs fine.
EDIT: i solved the problem using the following code:
is this the best way to handle the problem?
thanks for your help
r5ive
i have kind of the same problem. when i try to remove gui elements the gui freezes.
here my code:
Code: Select all
core::list<gui::IGUIElement*>::ConstIterator it = window->getChildren().begin();
for (; it != window->getChildren().end(); ++it) {
window->removeChild((*it));
}
EDIT: i solved the problem using the following code:
Code: Select all
while( window->getChildren().getSize() != 0 ) {
core::list<gui::IGUIElement*>::ConstIterator it = window->getChildren().begin();
window->removeChild((*it));
}
thanks for your help
r5ive
i would say it is. the other way would be filling a second list with the iterators and then removing them from the list which is much more complicated.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.