Can anyone do a sequence of events such that they can ‘make it happen’?
Here is the sequence of events that will make this happen.
-
First, create a Text Editor object that is one line high, but does NOT have the option checked to terminate editing when the Return key is pressed.
-
Next, click in the editor to edit the text. You’ll see the blinking insertion point.
-
Now press the Return key. This will add a second line of text, though you can’t see it. Apparently this also confuses Apple’s code that causes the insertion point to blink.
-
Finally, click on some other Text Editor object within the form. You will now have two blinking insertion points. Much earlier in this thread Robert asked which blinking point was the “real” one, the answer is the second one, as you can see by typing additional characters.
What I was missing before was the third step, pressing the Return key. If you skip that step (which doesn’t really do anything), the problem doesn’t occur.
Panorama itself contains 438 forms. I just now went through them and found 11 that had one line high Text Editor objects that were not set to terminate when the Returnn key was set. One of those forms was the Database Server Options panel that Robert posted. I originally told Robert that I couldn’t duplicate his results, but once I realized that pressing the Return key was a necessary step, I could. (Robert, if you had sent me a breakdown of the actions you had taken, instead of just a movie, I probably would have figured this out much faster. I just went back and watched the movie again, and there’s absolutely no way I could have told that you pressed the Return key.)
The solution to this problem is to go through your forms and look for Text Editors that are one line high and DON’T have the Return key set as a terminator. (Someone is going to suggest that Panorama should ignore the option and always use the Return key as a terminator if the editor is one line high. That is very tricky to do reliably because of size variations in different fonts. I won’t say this could never happen but for now the solution is for you to make sure to set this option, and probably make sure that the Tab key terminates while you are at it.)
Except for the initial selection of “All,” the Return key does not delete the contents, but it adds a carriage return. This behavior is not problematic for multiple-lined editors, as the carriage return is visible. However, it causes issues for single-lined editors. For the initial selection of “at End,” the cursor appears to blink normally, but the Return key has already added a carriage return. Unless the editor is tall enough to display multiple lines or a vertical scroll bar is enabled, the cursor cannot move down, resulting in the cursor remaining in the first line. Consequently, any keys entered at this point are hidden in the second line. Conversely, for the initial selection of “at Start,” the contents appear to be removed, but they are actually hidden in the second line.
This is incorrect behavior, and I’ll look into fixing it. In the meantime, there is a hack to fix this behavior. If you run this code on a form, pressing the Return key on a form will just beep.
definehotkeys "windowglobal", "RETURN", |||
zlogalways info("activeobjectid")
if info("activeobjectid")<>0
closeactiveobject
else
beep
endif
|||
I would suggest that you set up this code to run automatically when the form opens, as described here:





