PDA

View Full Version : InputTextRenderComponent::~InputTextRenderComponen t() calling "CloseKeyboard"



BigBMan
10-13-2011, 07:56 AM
I was connecting a function to "CloseKeyboard" and noticed that this function always gets called whether the keyboard is showing or not. This was causing bugs for me as the function would refer back to Entities and Components that were being deleted.

Modifying the component destructor as such fixed the problem for me.


InputTextRenderComponent::~InputTextRenderComponen t()
{
if (GetEntityWithNativeUIFocus() == GetParent())
{
GetFunction("CloseKeyboard")->sig_function(NULL);
}
}

Seth
10-13-2011, 01:45 PM
Thanks, I'll make this change