Applies to: posted in the Clarion 11 group in 2019; chain not stated, the embeds named are those of a generated window procedure.
Problem
The poster wanted code to run on every keystroke while an entry box has focus. With the Immediate (IMM) attribute set, the All Events embed point still was not reached on keystrokes.
Solution
- With IMM on, put the code in the control's NewSelection event embed; that is the event that fires per keystroke.
- At that moment the USE variable has not yet received the new text. To read what is currently typed, either call
UPDATE(?TheControl)first, so the variable is filled, or read?TheControl{PROP:ScreenText}directly. - The asker confirmed the PROP:ScreenText form as the one he wanted.
Caveats
- UPDATE copies the screen text to the USE variable, which a reader may not want in the middle of typing; the PROP:ScreenText read leaves the variable alone (the thread did not discuss this).
- Both repliers answered in a few lines and did not mention versions.
Today (2026)
Likely unchanged, since the IMM attribute and the property are language features; not re-tested on a current build.
Sources: Andrej (Nov 2019, the question), Leonid C. (Nov 2019), Olivier C. (Nov 2019) in sv.clarion.clarion11.