Move Cursor within noshow/endnoshow?


#1

Small procedure that starts in first field, does a few tweaks in the last field then finally, uses the field statement to focus/park the cursor back on the first field. If I encapsulate the procedure with noshow & endnoshow the cursor ends up parked on the last field. If I move the field statement after the endnoshow then it responds as expected parked on the first field.


#2

I’m seeing similar in a simple test database with 7 fields titled “A” thru “G” and I run this code

noshow
    field "A"
    «»=datepattern(today(),"MM/DD/YYYY")
    field "G"
    «»=timepattern(now(),"HH:MM:SS")
    field "A"
    showpage
endnoshow
message info("fieldname")

I find that the message dialog shows field A being the current field as expected from the procedure. But, what’s displayed on the data sheet after the dialog is dismissed is whatever field was selected when the procedure was called is still the selected field, and running info(“fieldname”) in the formula workshop shows that the selected field on the screen is the current field. So PanX is resetting the current field back to the original selection after the procedure is done.

Since placing the final “field” statement outside of the noshow block results in the expected behavior as you indicated, I’m not sure if the observed phenomenon when the “field” statement is executed within the noshow block is a bug, a feature, or just how things are??