Why isn't entry box open when gettext is invoked?

I just installed this routine in my calendar database when I saw GetText wasn’t opening ready to edit. It makes entering info for the text displays look much more professional than before. I did customize the parameter “theText” to show the existing value as the default. If it is blank, if you hit the enter button or ok button, your prior data is erased. This way, it reverts to what was there before…

Thanks to Gary and the others who contributed and elucidated the various aspects of getting it to work.

This is a bug that Apple introduced a while ago, I think macOS 10.13. It worked in earlier versions of macOS.

With help from an Apple engineer a workaround has been found for this, the fix will be included in Panorama X 10.2.

I also have found this “gettext” problem so irritating that I don’t use “gettext” in my procedures. Instead, I use:

supergettext (yourfieldname),{title="(yourfieldname)" height=100 width=150 font=Monaco style=bold size=18 titleheight=5 buttons=“OK;CANCEL”}
if info(“DialogTrigger”) = “CANCEL”
STOP
endif
This gives me an open entry box. Pressing ENTER once will not close the box, allowing you to add to, or correct the entry. Pressing ENTER again closes the box and makes the change to the field.

@admin, Apparently this is a problem again in OS Tahoe 26.

gettext no longer automatically focuses the entry field when it opens.

Could you please confirm?

Apple broke this years ago. According to my notes, an Apple engineer helped me to code a workaround hack at the labs at WWDC 2019. So six years ago. It sounds like Apple has now made a change that breaks this hack, which isn’t too surprising, as the hack technique is a bit fragile. Unfortunately I don’t have any Apple engineers on speed dial, so it may take quite a while to resolve this. If I recall correctly, the first time Apple broke this it took over a year to get the solution (i.e. until I found the right engineer at an in person WWDC Lab session). I’m not saying it will take another year, but I also don’t want to set any expectations for an easy fix.