How to set focus to textfield (2)
How to set focus to a textfield was subject of an earlier forum discussion. The solution that was given is to call
textfield.begin_editing()(as present in the delegate). This method is not implemented in the current version of Pythonista. Instead there are
textfield_should_begin_editing. I used both methods to give focus to a textfield, without result. So, is it still possible to give focus to a textfield? If yes, what do I wrong?
Interesting. I thought I was only imagining things when I thought that there was a
begin_editingmethod before, but it seems that that method was removed at some point.
What are you considering the 'latest version'? 1.6 beta, or 1.5?
begin_editingis missing from the docs, in 1.5 it is present for both TextView and TextField. Note that this method is called on the TextField object, not on the delegate!
t=ui.TextField() t.begin_editing() t.present()
Thanks JonB, your solution did the trick. It didn't come to my mind to call it on the TextField object, because I was convinced that it should be called from the delegate. Kind of tunnel vision…..