I've created a form in MX that has several text fields and combo boxes. As part of a validation routine, I check to see that certain fields contain data and if it doesn't, I present the user with an error message telling that such and such field needs to be filled in. When the user clicks the "back" button I have provided, they are returned to the frame that contains the text fields. So far, no problems.
It would be really nice to be able to place the cursor in the proper text field. I have used the following:
selection.setFocus("varname");
selection.setFocus("field_instance");
selection.setFocus("field_instance.varname");
selection.setFocus("clip_instance.field_name");
selection.setFocus("clip_instance.varname");
selection.setFocus("_root.varname");
selection.setFocus("_root.clipinstance.varname");
selection.setFocus("_root.clipinstance.field_name");
All that happens is the text in the first field on the form is highlighted. Has anybody run across this before and if so, did you reach a solution?
There's always a better way. The fun is trying to find it!
It would be really nice to be able to place the cursor in the proper text field. I have used the following:
selection.setFocus("varname");
selection.setFocus("field_instance");
selection.setFocus("field_instance.varname");
selection.setFocus("clip_instance.field_name");
selection.setFocus("clip_instance.varname");
selection.setFocus("_root.varname");
selection.setFocus("_root.clipinstance.varname");
selection.setFocus("_root.clipinstance.field_name");
All that happens is the text in the first field on the form is highlighted. Has anybody run across this before and if so, did you reach a solution?
There's always a better way. The fun is trying to find it!