UpdateDialog() function

Info about design forms features
PetrS
Site Admin
Posts: 181
Joined: 11 Jul 2014, 13:55

UpdateDialog() function

Postby PetrS » 15 Jul 2014, 14:24

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.
Attachments
InputChangeHandling.jpg
InputChangeHandling.jpg (39.48 KiB) Viewed 2929 times
UpdateDialog.cls
(26.73 KiB) Downloaded 330 times
Ing. Petr Slepicka
DesignForms Online
Engineering calculations online - EuroCode, AISC, statics
Automate your static calculations today!

PetrS
Site Admin
Posts: 181
Joined: 11 Jul 2014, 13:55

Re: UpdateDialog() function

Postby PetrS » 24 Jul 2014, 13:11

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.
Ing. Petr Slepicka
DesignForms Online
Engineering calculations online - EuroCode, AISC, statics
Automate your static calculations today!


Return to “Design forms features”

Who is online

Users browsing this forum: No registered users and 18 guests