925 new features in WINDEV, WEBDEV and WINDEV Mobile 2025

251 N e w f e a t u r e W D W B WM REACTIVE PROCEDURE OPTIONS Reactive Procedures offer 2 options: • Delay: This option defines a time period after which the pro- cedure must be executed. For example, 100 milliseconds after a value change: REACTIVE PROCEDURE CalculateTotal () <delay = 100ms > EDT_TOTAL = EDT_SUBTOTAL + EDT_SUBTOTAL * ( EDT_VAT+1) / 100 • Execution: This option triggers the execution of a Reactive Procedure programmatically. Benefit of this new feature in version 2025: Powerful programming 252 N e w f e a t u r e W D W B WM CASCADING A Reactive Procedure can modify a variable or a control used by another Reactive Procedure. In this case, the other Reactive Procedure will be executed. The framework implements the necessary security mechanisms to avoid calls in a loop, for example. Benefit of this new feature in version 2025: Code once, and let the framework take care of the rest 253 N e w f e a t u r e W D W B WM DETERMINE IF A CONTROL IS OBSERVED OR MODIFIED BY A REACTIVE PROCEDURE To find out whether a control can be modified by a Reactive Procedure, simply look at the lower-left corner of the 7-tab window of the control. • "23" indicates the number of uses of the control in the code • "7" indicates the number of uses of Reactive Procedures. Simply click an icon to view the list of uses (cross -references). Benefit of this new feature in version 2025: Knowledge is everything REACTIVE PROCEDURE OBSERVER DESIGN PATTERN NEW CONCEPT 254 N e w f e a t u r e W D W B WM PRACTICAL EXAMPLE DESIRED PROCESSES IN THIS WINDOW: • Disable the three radio button options, the two combo boxes and the OK button, until the check box is selected. • Once the user selects the check box, enable all the options. • When the user selects the first radio button option, enable the first combo box and disable the second one. • When the user selects the second radio button option, enable the second combo box and disable the first one. • Same process for the third option. With a Reactive Procedure, all of these processes come down to 11 simple lines of code! In this example, you can simply create a Local Procedure in the window, and declare it as a Reactive Procedure. That’s it. REACTIVE PROCEDURE Shipping_modes ()<delay= 1s > GR_SHIPPING ..Grayed = True // Default IF CBOX_GTC [ 1 ] = True THEN RADIO_SHIPPING_MODE ..Grayed = False SWITCH RADIO_SHIPPING_MODE CASE 1 // Delivery to one address COMBO_ADDRESS ..Grayed = False CASE 2 // Delivery to a relay point COMBO_RELAY_POINT ..Grayed = False CASE 3 // Store pickup END END Benefit of this new feature in version 2025: Magic! This procedure will be executed automatically when CBOX_GTC or RADIO_SHIPPING_MODE changes value,e.g.when a user selects an option 51 N e w f e a t u r e s i n W I ND E V 2 0 2 5 WE B D E V 2 0 2 5 W I ND E V Mo b i l e 2 0 2 5 & W I ND E V S u i t e S a a S

RkJQdWJsaXNoZXIy NDQ0OA==