NickM
01-04-2009 18:29:15
I have a ComboBox that I have added a couple of items to, I'm then trying to clear the box and add some new items, I tried just calling
but once I've added the new items, as soon as I open the dropdown I get a crash on the last line in
I also tried just clearing the items several times in a row without opening the dropdown and I get a crash on the last line here
In the above crash it cant find the auto named widget.
I thought I'd then try destroying the items by calling
but that crashes on the last line here
I'm going to look into it more after my dinner but thought I'd see if I'm doing something wrong, sorry to be a pain.
ComboBox->clearItems()
but once I've added the new items, as soon as I open the dropdown I get a crash on the last line in
void Window::updateTexturePosition()
{
// Remember that Windows are their own texture, thus their "screen" position is zero.
mTexturePosition = Point::ZERO;
// Update component screen dimensions, must be done after client and screen rect have been calculated
for(std::map<Ogre::String,Widget*>::iterator it = mComponents.begin(); it != mComponents.end(); ++it)
{
(*it).second->updateTexturePosition();
}
// Update children screen dimensions, must be done after client and screen rect have been calculated
for(std::vector<Widget*>::iterator it = mChildren.begin(); it != mChildren.end(); ++it)
{
(*it)->updateTexturePosition();
I also tried just clearing the items several times in a row without opening the dropdown and I get a crash on the last line here
Widget* ContainerWidget::findWidget(const Ogre::String& name)
{
Widget* w;
for(std::vector<Widget*>::iterator it = mChildren.begin(); it != mChildren.end(); ++it)
{
w = (*it)->findWidget(name);
In the above crash it cant find the auto named widget.
I thought I'd then try destroying the items by calling
ComboBox->destroyItem(i)
but that crashes on the last line here
void ComboBox::destroyItem(unsigned int index)
{
Factory<Widget>* widgetFactory = FactoryManager::getSingleton().getWidgetFactory();
bool updateItems = false;
float yPos = 0;
int count = 0;
for(std::list<ListItem*>::iterator it = mItems.begin(); it != mItems.end(); ++it)
I'm going to look into it more after my dinner but thought I'd see if I'm doing something wrong, sorry to be a pain.
