Applies to: posted in the Clarion 5.5 EE group (products.c55ee); the thread names no template chain.
Problem
The poster counted how many windows were open. A Frame menu item had to be disabled when the count was above 0 and enabled when it was 0. The item had to follow every procedure that opens or closes (window, process, report, anything). He asked which Frame embed point is best for this.
Solution
Three approaches were offered; the poster said he would try the first two.
- TakeEvent of the Frame. If some procedures start a thread, post an event back to the Frame so its TakeEvent runs. The poster said posting an event to the Frame was the piece he had been missing.
- The Frame's Event:Timer embed (timer set to 100), checking a set of global variables that hold the value of THREAD() for each child screen when it is opened. This handles general menu changes.
- For specific menu options on non-MDI screens: disable the item in the embed before the Event:Accepted of the menu item, and re-enable it in the embed after it, when the screen closes.
A further poster uses ThisWindow.Reset for setting window control properties, because properties that depend on changing variable values fit Reset better than a single EVENT in TakeEvent.
Caveats
- The poster did not report back on which approach he kept.
- The timer approach polls; the thread does not discuss its cost.
- The thread gives no code, only the embed point names.
Today (2026)
The embed names come from the ABC and Legacy Frame templates of that era. Likely still a sound starting point, not re-tested on a current build.
Sources: Chris M. (May 2001, the question), Dennis E. (May 2001), Barry G. (May 2001), Douglas J. (May 2001) in softvelocity.products.c55ee.