Silverfrost Forums

Welcome to our forums

ClearWin+ or something else?

4 Jan 2026 2:15 #32675

Before I try to create a smaller example of the problem, perhaps someone has had a similar issue and has fixed it.

Background: The window is created with some descriptive text at the top, along with a small set of menu options, and a %ps consisting of 4 nearly identical child windows. Each window contains 40 sets of text/integer/integer. The purpose is that the text portion is a transaction type and the two integers are the account number range. The 4 child windows each represent different types of data. Each %sh uses a set of nested %ob's to maintain formatting of the data; two columns of 20 items each.

Behavior: Upon initial entry to the window, if I immediately leave by selecting the menu option to return to the previous window (function callback returns a -1), the program becomes unresponsive (i.e. no selection possible with the mouse), the 'busy' cursor icon shows up a few times for a few seconds each time, and the program fully closes with no error indication. Tracing in the program shows that the winio@() final call that created the window never returns.

If, however, I use the mouse and place the cursor in any field of that first child window (selecting text or number, just getting the cursor there; neither matters), then choosing the menu option closes the window properly.

Also, if I select any other child window from the tabs, then select the menu option, the window closes properly.

If I close the window using the 'X', then the window closes properly.

In all of these scenarios, none of the underlying/displayed data is changed.

Has anyone seen this behavior? Or, is it time to pare it down to the essentials and see if I can get the smaller example to fail?

4 Jan 2026 11:06 #32677

If it is any consolation, I gave up on %ps as a method to have nested sheets like Excel or my other favourite, CorelDRAW! It was some years ago, but I still feel the pain. I suspect that it isn't an innate problem with 'property sheet(s)', but in how I was trying to use them.

My solution, for what it's worth, is to have a set of icons, one for each window type (4 in your case) along the base of each window. Obviously, the one that matches the current window is greyed out. Using those icons, you can move between the windows, closing the current one (while saving its contents) and opening the new one in the same position as the one that closes, using %gp on the closure control, and %sp when opening the other window.

On another app, I drew the icons to look like tabs. Excel's tabs are at the base of the master window, while CorelDRAW!'s are near the topm. I found that, contrary to my expectations, large pictorial and coloured icons to move backwards and forwards through the windows worked rather better than icons that attempted to look like tabs, and better than forward/backwards images.

I suppose that the windows could all be child windows using %ch, but I haven't tried that.

I hope this is some help.

Eddie

4 Jan 2026 9:08 #32678

Eddie,

As always, your insights are helpful.

In addition, I have discovered that not all of the statements I made are true. For example, entering a control without editing, then 'Prev Menu' will still, sometimes, cause a crash. Stated another way: It will, at some point, crash, regardless of what one does EXCEPT cancelling the window via the 'X'. That has never failed, thus far. It will probably prove me wrong as well, at some point.

The non-deterministic nature of this problem will point me in a different way, I am sure.

Bill

4 Jan 2026 9:17 #32679

I looked at some older code of mine that used %ps extensively without issue. The difference was the option specified. My non-working one had no options. My working ones had the option 'ms_style,hot_track' as the option. When I added this in, everything appears to work.

5 Jan 2026 6:49 #32680

Two points of detail:

  1. hot_track implies ms_style.
  2. ms_style interfaces to the Microsoft tabcontrol, otherwise an original and native ClearWin+ control is used. So they are quite different.
6 Jan 2026 4:53 #32681

Thanks, Paul, for clearing up the details.

Please login to reply.