forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

%rs control is not refreshed with new salflibc.dll

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Thomas



Joined: 18 Feb 2005
Posts: 56
Location: Gummersbach, Germany

PostPosted: Sat Jan 02, 2021 8:31 pm    Post subject: %rs control is not refreshed with new salflibc.dll Reply with quote

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
View user's profile Send private message Visit poster's website
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Sat Jan 02, 2021 10:53 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Thomas



Joined: 18 Feb 2005
Posts: 56
Location: Gummersbach, Germany

PostPosted: Sat Jan 02, 2021 11:10 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sun Jan 03, 2021 9:26 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Thomas



Joined: 18 Feb 2005
Posts: 56
Location: Gummersbach, Germany

PostPosted: Sun Jan 03, 2021 10:40 am    Post subject: Old bahaviour for %`rs Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Jan 04, 2021 10:25 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Thomas



Joined: 18 Feb 2005
Posts: 56
Location: Gummersbach, Germany

PostPosted: Mon Jan 04, 2021 12:22 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Tue Apr 20, 2021 12:56 pm    Post subject: Reply with quote

Paul,
Are these dlls available as I'm having trouble updating %`rs fields.
Ian
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue Apr 20, 2021 1:59 pm    Post subject: Reply with quote

Ian

Yes. The latest DLLs can be downloaded via

http://forums.silverfrost.com/viewtopic.php?t=4245
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group