override void HandlerAttached(Widget w)
{
super.HandlerAttached(w);
m_wEditBox = EditBoxWidget.Cast(w);
if (!m_wEditBox)
m_wMultilineEditBox = MultilineEditBoxWidget.Cast(w);
if (!m_wEditBox || !m_wMultilineEditBox)
{
Print("EditBoxFilterComponent used on invalid widget type.", LogLevel.WARNING);
return;
}
This code is supposed to check if the handlers widget is either an edit box or a multi line edit box.
if (!m_wEditBox || !m_wMultilineEditBox) should use && instead of ||, because right now it "ensures" it is both an EditBoxWidget and a MultiLineEditBoxWidget (which is impossible) and warns you otherwise.
This also breaks the character blacklist and whitelist, because they follow after the if body - the return statement prevents them from being set up properly.