Page 1 of 1

UpdateDialog() function

Posted: 15 Jul 2014, 14:24
by PetrS
Function UpdateDialog()
Version 5.2.0 and higher

Function UpdateDialog() is used to update main dialog in SDF User.

Syntax:
void UpdateDialog() {
<dialog_update_instructions>
}

Whenever the user makes any change/input in the dialog, entire calculation tab is updated. See attached picture to understand basics of user input handling process.

As you can see, dialog is updated in two steps:
1) Call UpdateDialog() function to update visibility, accessibility etc. This function is called in GUI thread (blocking user inputs until finished). Function should be as fast as possible.
2) Calculate main script to obtain results, than update dialog with these values - numeric and string inputs, checkboxes, combos, ... This is processed in parallel thread (not blocking user interface), execution can take some time.

Using UpdateDialog() function is strongly recommended. Advantages:
  • Dialog update is much faster
  • Main script doesn't contain instructions for dialog handling. This is very useful when such a calculation is called from SEN (!)
  • More readable and understandable script


See attached example for more details.

Re: UpdateDialog() function

Posted: 24 Jul 2014, 13:11
by PetrS
Update dialog functions for SEN dialog

Update dialog functions are available for all dialog available in Design forms:
  • MainDialog - UpdateDialog()
  • MemberDataDialog - UpdateMemberDataDialog()
  • SetupDialog - UpdateSetupDialog()
  • CommandDialog - UpdateCommandDialog()

Define these functions to modify components visibility or other properties in these dialogs.
All these functions works identically.