View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Fri Apr 24, 2020 4:15 am Post subject: An equivalent to %sc |
|
|
Since %sc works while the window is being constructed, and before it gains control, is there a function that can be run immediately BEFORE control returns to the calling program? This would allow initialization and the propagation of variables onto the window(s).
Kind of like the two variants of %cc.
Discussion? Potential? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Fri Apr 24, 2020 8:07 am Post subject: |
|
|
The %sc start callback function is called immediately after the window is first painted and before the user gains control. If the call results in changes to the display then the callback function must return 1 (not 2) in order to trigger a refresh of the screen.
I would have thought that this covers all requirements. If not then it would be possible to provide an alternative with a call immediately after the window has been created.
It is worth noting that data can sometimes usefully be created in the middle of a sequence of winio@ continuations. For example, a %gr graphics region can take drawing instructions after the %gr but before the terminating winio@. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Fri Apr 24, 2020 1:59 pm Post subject: |
|
|
Thanks, Paul. I'll do some more experimentation and see if I can duplicate what I was experiencing in a simpler example. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Fri Apr 24, 2020 4:42 pm Post subject: |
|
|
Well, I cannot duplicate what I saw a few days ago. I will confess that I have made a number of changes to the init code to remove any timers that might have been there (splash screen specifically), so whatever I have done, it works as it was intended.
Thanks for listening!
Bill |
|
Back to top |
|
|
|