|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Fri Jun 18, 2021 3:45 pm Post subject: Return from %mn callback not working |
|
|
Something changed after 8.71 (scc_lib version=18664).
Previously, when a %mn callback is processed, the return value can be used to terminate the parent window. The following code illustrates this. Clicking on the %mn causes the callback function to execute and begin counting down the value that is also returned through the callback. Once it reaches 0, I decrement it yet again to make sure it is -1 or less. When this happens, the parent window does not close, as it should. When the window is manualy closed, the last value returned from the callback function is returned (as the absolute value), and displayed.
This code was compiled using all the latest DLL's, compiler, etc.
Code: |
winapp
program main
integer,external:: run1
integer:: ret_val
common/dataishere/ret_val
data ret_val/5/
i=winio@('%mn[Change]&',run1)
i=winio@('%`rd', ret_val)
print *,i
end
integer function run1()
use mswin
integer:: ret_val
common/dataishere/ret_val
ret_val = ret_val - 1
if(ret_val.eq.0)ret_val = ret_val - 1
call window_update@(ret_val)
run1 = ret_val
return
end
|
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Fri Jun 18, 2021 6:23 pm Post subject: |
|
|
Thanks Bill.
This has been fixed and a new set of DLLs has been uploaded. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Sat Jun 19, 2021 3:37 am Post subject: |
|
|
Thanks, Paul! All working now! |
|
Back to top |
|
|
|
|
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
|