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 

Return from %mn callback not working

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



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Fri Jun 18, 2021 3:45 pm    Post subject: Return from %mn callback not working Reply with quote

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


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

PostPosted: Fri Jun 18, 2021 6:23 pm    Post subject: Reply with quote

Thanks Bill.

This has been fixed and a new set of DLLs has been uploaded.
Back to top
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sat Jun 19, 2021 3:37 am    Post subject: Reply with quote

Thanks, Paul! All working now!
Back to top
View user's profile Send private message Visit poster's website
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