Incomplete control definitions in SubScripts
Posted: Thu Sep 16, 2021 10:00 pm
Hi,
I've been working on a screen that is defined with the constant screen content in a main screen script file and the dynamic content specified in individual subscript files. This makes it much easier to add and maintain the screens since the dynamic content can be implemented in small subscript files that don't replicate the entire screen content.
When I saw the 4.3.5f patches (9/13/21) that was made in relation to this discussion viewtopic.php?t=1422&p=4757 I thought I'd see if I could take advantage of a couple of great features in that patch: 1) partial control definitions in subscripts and 2) repainting controls when the text or color changes. Both of these feature would really simplify my subscripts. #1 removed the maintenance challenge of making sure all files are update when a control on the main part of the screen is repositioned, resized, etc. #2 removes the need to set a control to hidden and back to visible to get to to repaint after changing the text or color.
The sample provided loaded the subscript via C code using the ScreenScript() function. I need to load the subscripts in button actions. However that doesn't seem to work for feature #1. What happens is it accepts the subscript file with incomplete control definition but clears the field that are not specified, e.g. position, size, show, etc. Would it be possible to extend this functionality to subscripts loaded by button actions?
Feature #2 works fine if the control is fully specified in the subscript.
Thanks,
Larry
I've been working on a screen that is defined with the constant screen content in a main screen script file and the dynamic content specified in individual subscript files. This makes it much easier to add and maintain the screens since the dynamic content can be implemented in small subscript files that don't replicate the entire screen content.
When I saw the 4.3.5f patches (9/13/21) that was made in relation to this discussion viewtopic.php?t=1422&p=4757 I thought I'd see if I could take advantage of a couple of great features in that patch: 1) partial control definitions in subscripts and 2) repainting controls when the text or color changes. Both of these feature would really simplify my subscripts. #1 removed the maintenance challenge of making sure all files are update when a control on the main part of the screen is repositioned, resized, etc. #2 removes the need to set a control to hidden and back to visible to get to to repaint after changing the text or color.
The sample provided loaded the subscript via C code using the ScreenScript() function. I need to load the subscripts in button actions. However that doesn't seem to work for feature #1. What happens is it accepts the subscript file with incomplete control definition but clears the field that are not specified, e.g. position, size, show, etc. Would it be possible to extend this functionality to subscripts loaded by button actions?
Feature #2 works fine if the control is fully specified in the subscript.
Thanks,
Larry