Focusing Inputs

From TDN

Original Question:

I wanted to learn about the GUI system, and my kids needed a good math facts drill program, so I made one. I'm still trying to figure out how to make the input box focused programatically.

Answer:

This is a case where you will want to name your GUI control. Something like txtAnswerBox should look like this in the file:

  new guiTextEditCtrl(txtAnswerBox) {}

You can then call the following to set focus to that control:

  txtAnswerBox.makeFirstResponder(true);