View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Mon Nov 09, 2020 3:11 pm Post subject: Update to %`rs |
|
|
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.
Code: | 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
|
|
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Mon Nov 09, 2020 11:49 pm Post subject: |
|
|
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.
Code: | 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 |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Tue Nov 10, 2020 12:23 am Post subject: |
|
|
PS: my code runs correctly with the earlier newDLLs50, but not the most recent newDLLs51. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Tue Nov 10, 2020 12:51 am Post subject: |
|
|
I did also confirm that this does NOT occur with %rd or %rf.
Bill |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Tue Nov 10, 2020 2:21 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Tue Nov 10, 2020 4:37 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Tue Nov 10, 2020 7:14 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Tue Nov 10, 2020 7:37 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Wed Nov 11, 2020 1:08 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Wed Nov 11, 2020 3:09 pm Post subject: |
|
|
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! |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Wed Nov 11, 2020 7:08 pm Post subject: |
|
|
Bill
I am still confused by this.
In your experience has %`rs ever worked as you expect when used in a property sheet? |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Wed Nov 11, 2020 8:02 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Wed Nov 11, 2020 8:26 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Wed Nov 11, 2020 8:40 pm Post subject: |
|
|
Since my current code uses change_help_text@(), DLLS49 prevents me from properly linking. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Thu Nov 12, 2020 10:35 am Post subject: |
|
|
Both these issues have now been fixed for a future release of the ClearWin+ library. |
|
Back to top |
|
|
|