Applies to: a standard window procedure in the ABC chain; the thread was posted in the Clarion 9 group.
Problem
A small window opens before the application frame and asks for a password, with OK and Cancel buttons. The poster set GlobalResponse in the buttons' Accepted embeds, then made the procedure a function returning a value set there. Neither worked: Event:Accepted never fired on those buttons; they generated only Selected and Selecting (257 and 258).
Solution
- The buttons carry a standard close action, which shortcuts other events and bypasses embed code. The poster found it was the STD:Close attribute in the Extras part of the property list.
- Remove it. Set the return value in the Accepted embed, then post Event:CloseWindow. That worked for the poster.
- Another poster suggested the same idea in the response object: set ThisWindow.Response to RequestCompleted or RequestCancelled, then POST(EVENT:CloseWindow).
- Where the cancel is tested decides how to leave: from the global After code embed a plain RETURN will do; early in the frame, RETURN(LEVEL:Fatal).
Caveats
- A third poster warned that other things close a window too (the ESC key, for example); to catch them all use the EVENT:CloseWindow embed in TakeWindowEvent().
- The same poster advised against changing STD:Close in general, as it might skip WindowManager code that is needed.
- Hiding the real close button and catching a dummy button, then POST(EVENT:Accepted, ?Button:Close), was a further idea.
Today (2026)
Likely unchanged for ABC window procedures. Not re-tested.
Sources: Jon W. (Sep 2014, the question), John G., Carl S., Arnor B. (Sep 2014) in sv.clarion.clarion9.