Create an Initialize Operator to Clear an Input Field

InstructorJohn Lindquist

Share this video with your friends

Send Tweet

After we've loaded a new word we also want to clear the input field so that we can just start guessing the next word that has loaded. Since the broadcaster from the input field won't send any events we will need to do it manually through an operator. We can set up an operator that will initialize any value anytime the broadcaster is set up. This will allow us to send an empty string down to the listener and we can use that value to clear the value of the input field.