Silverfrost Forums

Welcome to our forums

Default button callback value not returned to parent

22 Jun 2021 1:30 #27985

The following code should, when a ENTER is done, return the value 400 as the value from the closure of the window. It does not. Clicking the button will, however.

This function works as it should if the button is NOT in the child window.

        winapp
        program main
        integer,external:: runx
        integer:: ret_val
        integer(7):: child
        data ret_val/5/
        i = winio@('%sh&',child)        
        i = winio@('%`^bt[Change]%nl&',runx)
        i = winio@('%bt[Not Default]')
        i = winio@('%ch&',child)
        i=winio@('%`rd', ret_val)
        print *,i
        end
        integer function runx()
        use mswin
        runx = -400
        return
        end
22 Jun 2021 6:49 #27986

Bill

Is this a regression or has it never worked?

I will take a look at it as soon s possible.

22 Jun 2021 12:11 #27987

This appears to be a regression. I (vaguely) remember reporting something like this long ago, where a callback value did not have an effect on the parent. I can't seem to find the post, and it might not be from a default button like this is. I seem to remember that it was clicking a button in a child window (most likely %ps usage) and it did not return the value to the parent for closing the window.

I did check my baseline version created with compiler 8.71 and the DLL's applicable at that time, and it has this same issue.

This is not something I have done a lot of, so I don't have a series of baselined releases that I can try out to identify a time frame.

Please login to reply.