Silverfrost Forums

Welcome to our forums

Update to %`rs

9 Nov 2020 2:11 #26573

I have been using %`rs to show a string, and update the string as the user proceeds through my code. But, it doesn't appear to work like I expect anymore.

I thought it had something to do with %ps tabs, but apparently not. I have the code below that illustrates the issue.

The %`rs appears in the main window and in Tab 1. Tabs 2 and 3 have a %rs in its other forms. for comparison. The button callback regenerates the text to be displayed and applies a counter to it.

I am using V8.66.0, and this problem shows in checkmate and release for both 32 and 64 bits.

	winapp
	PROGRAM MAIN
	use mswin
        integer,external:: abcd
        character*40:: rs_text
        common/rs_text_common/rs_text
        data rs_text/'This is the standard text for the %rs'/
        integer:: tabs(3),i,j
        i = winio@('%sh%ca[Tab 1]&',tabs(1))
        i = winio@('%`rs&',rs_text)
        i = winio@(' ')
        i = winio@('%sh%ca[Tab 2]&',tabs(2))
        i = winio@('%~rs&',rs_text,0)
        i = winio@(' ')
        i = winio@('%sh%ca[Tab 3]&',tabs(3))
        i = winio@('%rs&',rs_text)
        i = winio@(' ')
        i = winio@('%ww%^bt[Change Text]%2nl%`rs%2nl%3ps[ms_style,hot_track]',abcd,rs_text,tabs(1),tabs(2),tabs(3))
        
        end
        integer function abcd()
        character*40:: rs_text
        common/rs_text_common/rs_text
        integer:: i=0
        abcd = 1
        i = i + 1
        write(rs_text,*)'This is now click number',i
        call window_update@(rs_text)
        return
        end
9 Nov 2020 10:49 #26574

I have taken a quick look at this and I can confirm that Bill's observation of there being a change in the behavior of %`rs

In my case, the problem occurs with the following line, where run_up_time is updated at the end of a calculation. This is similar to Bill's %`rs in the main window.

iw = winio@('%2nl%ws%ta%8`rs&','Run up time [s]',run_up_time)

Looking at my diary, I think the change in behavior occurs with the updates provided after June 2020.

Ken

9 Nov 2020 11:23 #26575

PS: my code runs correctly with the earlier newDLLs50, but not the most recent newDLLs51.

9 Nov 2020 11:51 #26576

I did also confirm that this does NOT occur with %rd or %rf.

Bill

10 Nov 2020 1:21 #26578

Thank you for the feedback.

The ClearWin+ library code for %`rs was changed on 25 September 2020 in order to make it work as intended in the design.

It is unfortunate that this correction now look like a regression from the user's perspective.

At the moment it is not clear to me how this should to be resolved.

10 Nov 2020 3:37 #26580

Paul, I don't understand what the 25 Sept change was intended to do. Since this option no longer works as the documentation states, I guess I am just confused what drove this change.

Now, this works just like a %ws. I'm fine with %ws when needed, but I really need a %`rs or I'll need to replace dozens upon dozens of instances with ?????.

Bill

10 Nov 2020 6:14 #26581

Bill

I have now worked out how to resolve this issue and will aim to get back to you with a fix fairly soon.

I remember as a child watching a Laurel and Hardy cartoon where they drilled mouse holes only to plug them up again. This could be similar.

10 Nov 2020 6:37 #26582

Paul,

I, too, have had to 'plug the mouse holes' after doing something that seemed, at the time, a reasonable thing to do/try. In fact, it was under a month ago, and I went way too far and got things so balled up my only recourse was to reload from my backup. The ultimate 'plugging'.

Thanks for addressing this. I look forward to completion.

Bill

11 Nov 2020 12:08 #26585

There seems to be two issues here.

I can restore the behaviour for the %`rs that is not in a property sheet but it seems to me that the one within the property sheet was not 'working' before this regression. The latter issue remains outstanding.

11 Nov 2020 2:09 #26586

Paul, I may have not been clear. The original problem was noted by me in a new program that exclusively uses property sheets. I thought it was this usage that was causing the problem. The test code showed it occurred in both usages. I'm not remembering that there was a reported issue about just in property sheets.

I have found in property sheets that an explicit call to window_update@() is needed for some variables to update. Is this what you are referring to? I've no problem with explicit updating!

11 Nov 2020 6:08 #26587

Bill

I am still confused by this.

In your experience has %`rs ever worked as you expect when used in a property sheet?

11 Nov 2020 7:02 #26588

My memory is that it worked in property sheets, but I had to give an explicit window_update@() for it to properly show. Thinking back, I remember a month or so ago running the code with a customer remotely, and not seeing the expected results show in the %`rs position. I ignored it, looking to get back to it later, and forgot to log it.

I'll (carefully) re-install DLLS50 (per Kenneth Smith note) and see if it runs as I expect it to after that.

Bill

11 Nov 2020 7:26 #26589

I searched my code for a current instance where a %`rs appeared in a child window. I cannot find anything. That is not to say that it did not occur in a previous version (still in development).

I can say that DLLS49 (my last downloaded version) does allow the %`rs to update in the main window when explicitly commanded. DLLS51 does not.

11 Nov 2020 7:40 #26590

Since my current code uses change_help_text@(), DLLS49 prevents me from properly linking.

12 Nov 2020 9:35 #26595

Both these issues have now been fixed for a future release of the ClearWin+ library.

Please login to reply.