« Tips » : différence entre les versions

De GENIUS
Aller à la navigation Aller à la recherche
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
== Use the setNameInConfigurationFile() method
== Use the setNameInConfigurationFile() method ==


To avoid possible non compatibility when you want to change the label of an entry widget, it is fully recommended to use the <font color=#4169E1>setNameInConfigurationFile()</font> method. For example :
To avoid possible non compatibility when you want to change the label of an entry widget, it is fully recommended to use the <font color=#4169E1>setNameInConfigurationFile()</font> method. For example :

Version du 25 mars 2026 à 13:16

Use the setNameInConfigurationFile() method

To avoid possible non compatibility when you want to change the label of an entry widget, it is fully recommended to use the setNameInConfigurationFile() method. For example :

real  = new GEntryReal("Real:", 0.);

... will correspond inside the XML saved file to the following line :

<Real name="Real:">0.0E0</Real>

So, if you decide to change the label in "Double" rather than "Real", the content of the XML file will be now :

<Real name="Double:">0.0E0</Real>

... and the previous saved files will be no more readable.

On the contrary, if your code is the following one:

real  = new GEntryReal("Real:", 0.);
real.setNameInConfigFile("value");

... the content of the file will be :

<!--Real:-->
<Real name="value">0.0E0</Real>