View previous topic :: View next topic |
Author |
Message |
Thomas
Joined: 18 Feb 2005 Posts: 56 Location: Gummersbach, Germany
|
Posted: Sat Jan 02, 2021 8:31 pm Post subject: %rs control is not refreshed with new salflibc.dll |
|
|
The following example works well with salflibc.dll dated 2019-12-29. After installation of FTN95 version 8.70 the new salflibc.dll is dated 2020-11-17. Since then the filename in the %rs control is not refreshed after return from the call back function with return value 1.
Please try the following example with old and new salflibc.dll:
Program Example
Implicit None
Character (len=50) :: FileName
Common FileName
Integer :: i
Integer, External :: iii, xxx
FileName = 'C:\00 Sonstige\03 Thomas\Example.f90'
i = WINIO@('%mn[&File]&',iii)
i = WINIO@('%mn[&Exit]&',xxx)
i = WINIO@('%1nlFileName:%ta&')
i = WINIO@('%tc[red]%`50rs%tc&',FileName,-1)
i = WINIO@('%1nl')
End
Integer Function iii()
Implicit None
Character (len=50) :: FileName
Common FileName
FileName = 'X:\123\Test.txt'
iii = 1
end
Integer Function xxx()
Implicit None
xxx = 0
end _________________ Thomas |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Sat Jan 02, 2021 10:53 pm Post subject: |
|
|
The documentation says:
Quote: | If %`rs is specified, then the string presented can only be changed by the program using WINDOW_UPDATE@(value). |
Therefore you need to modify your code:
Code: | Program Example
Implicit None
Character (len=50) :: FileName
Common FileName
Integer :: i
Integer, External :: iii, xxx
FileName = 'C:\00 Sonstige\03 Thomas\Example.f90'
i = WINIO@('%mn[&File]&',iii)
i = WINIO@('%mn[&Exit]&',xxx)
i = WINIO@('%1nlFileName:%ta&')
i = WINIO@('%tc[red]%`50rs%tc&',FileName,-1)
i = WINIO@('%1nl')
End
Integer Function iii()
Implicit None
Character (len=50) :: FileName
Common FileName
FileName = 'X:\123\Test.txt'
call window_update@(FileName) !#########
iii = 1
end
Integer Function xxx()
Implicit None
xxx = 0
end
|
|
|
Back to top |
|
|
Thomas
Joined: 18 Feb 2005 Posts: 56 Location: Gummersbach, Germany
|
Posted: Sat Jan 02, 2021 11:10 pm Post subject: |
|
|
Thanks, Kenny. And all the best for the new year!
I was not aware of the documentation regarding %`rs. It worked without windows_update@ actually for a very long time. During my today's investigation and tests I became already aware of this subroutine but considered this initially only as a workaround and not as a permanent solution. Now, after your confirmation, I have to change my mind. Unfortunately there is a larger number of programs where I used %`rs. _________________ Thomas |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Sun Jan 03, 2021 9:26 am Post subject: |
|
|
Thomas
If the amount of work needed is excessive then please let me know.
I could probably add a mechanism to opt for the old behaviour. |
|
Back to top |
|
|
Thomas
Joined: 18 Feb 2005 Posts: 56 Location: Gummersbach, Germany
|
Posted: Sun Jan 03, 2021 10:40 am Post subject: Old bahaviour for %`rs |
|
|
A mechanism to re-activate the old behaviour would be great, provided that it will be realised as a permanent solution.
It's not urgent to get it resolved but urgent to know if there will be a solution in the medium term or not. For a short period we can keep the old salflibc.dll. _________________ Thomas |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Mon Jan 04, 2021 10:25 am Post subject: |
|
|
Thomas
I have sent you a personal message with a link to a new set of DLLs.
You will need to add the following line (once) to your code at the start of your main program (say) before the first call of winio@ with %`rs.
Code: | call clearwin_option@("rs_read_only") |
|
|
Back to top |
|
|
Thomas
Joined: 18 Feb 2005 Posts: 56 Location: Gummersbach, Germany
|
Posted: Mon Jan 04, 2021 12:22 pm Post subject: |
|
|
Paul,
This works perfectly for my applications. The number of %`rs references is not too large (56 references in 13 Fortran source files out of a 3901 fortran source files in total), because it is used in a limited number of central subroutines. The number of application specific callback functions, which request the refreshment of the text items, is however significant larger.
I could now reduce the effort by adding the call to clearwin_option@ to a central initialisation function and it works for all applications.
Thank you for quick and efficient support. _________________ Thomas |
|
Back to top |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Tue Apr 20, 2021 12:56 pm Post subject: |
|
|
Paul,
Are these dlls available as I'm having trouble updating %`rs fields.
Ian |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
|
Back to top |
|
|
|