KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Updating Variables on a 4D Dialog with API commands
PRODUCT: 4D | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: June 22, 2001
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

When using a 4D Dialog inside a plugin and updating any variables on screen you must remember to call PA_Dial4DBeginUpdateVariables and PA_Dial4DEndUpdateVariables. If these commands are not called the updates to the variables will not take effect. PA_Dial4DBeginUpdateVariables tells 4D that several variables in the 4D Plugin Dialog may be updated. PA_Dial4DEndUpdateVariables signals to 4D that the updates have been completed.

In the example below we have two longint variables that we want to update. We must surround these variable updates with calls to PA_Dial4DbeginUpdateVariables and PA_Dial4DendUpdateVariables for the updates to take place.

PA_Dial4DBeginUpdateVariables(dialog);
PA_Dial4DSetLong(dialog, "vZip", NewZipCode);
PA_Dial4DSetLong(dialog, 3vSalary2, NewSalary);
PA_Dial4DEndUpdateVariables(dialog);

For more information:
https://www.4D.com/SDK