as a part of per customer, or even per user customization, on some types of windows we provide a custom, configurable menus. We create local menus and items at runtime and use the Clarion’s mechanism that merges them to the global application menu.
Unfortunately, on the windows where we need to add local menu, we do not have a menubar. Despite this, it worked for ages and a menu dynamically created locally, inside a window, appeared in the global menu. However, we have observed more and more frequent hangs of the application when closing quickly one by one (with Esc) the windows that have their own menu. Application hangs somewhere in the ClaRun when leaving a scope of the window procedure (after kill, it cannot terminate the current thread? or cannot switch to another one? deadlock occurs?).
For testing, we added menubars on several windows and with this fix, we do not observe the freezes anymore, but as the system contains hundreds of windows, we cannot add a menubar statically/manually to every window. So we decided to add it dynamically, just before adding the local menu. And here is the crux of the problem - the menubar created at runtime with CREATE does not merge with the global application menubar, but replaces it. That is, it behaves as if it had the NOMERGE attribute set to TRUE and it does not respond to changes to this attribute.
Does anyone experienced a similar problem? Any tips on creating menubars at runtime? Or the problem with application hangs in general?