Hello,
I am trying to set up an EditBox in my addon that will let me get the typed data as a string for use in various functions.
I have an XML template file which I have set up thusly:
Code:
<Backdrop name="$(parent)SearchBG" inherits="ZO_EditBackdrop" alpha="0.5" >
<Dimensions x="365" y="25" />
<Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="BOTTOMLEFT" offsetX="452" offsetY="7" />
</Backdrop>
<EditBox name="$(parent)SearchBox" inherits="ZO_DefaultEditForBackdrop" maxInputCharacters="100" editEnabled="true" AnchorFill="SearchBG" >
<Dimensions x="365" y="25" />
<Anchor point="TOPLEFT" relativeTo="$(parent)SearchBG" relativePoint="TOPLEFT" offsetX="0" offsetY="0" />
<OnEnter>
</OnEnter>
<OnMouseEnter>
</OnMouseEnter>
<OnFocusLost>
</OnFocusLost>
<OnTextChanged>
</OnTextChanged>
</EditBox>
When I attempt to use control:GetText() on the SearchBox control however, I receive the following error:
1459570963798820363:3: function expected instead of nil
stack traceback:
1459570963798820363:3: in function '(main chunk)'