« Tips » : différence entre les versions

De GENIUS
Aller à la navigation Aller à la recherche
Page créée avec « 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 : <syntaxhighlight lang="java"> real = new GEntryReal("Real:", 0.); </syntaxhighlight> ... will correspond int he XML saved file to the following line : <syntaxhighlight lang="xml"> <R</syntaxhighlight> </syntaxhighlight> So, if you decide to change the label i... »
 
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
== 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 :


Ligne 5 : Ligne 7 :
</syntaxhighlight>
</syntaxhighlight>


... will correspond int he XML saved file to the following line :
... will correspond inside the <font color=#FF8C00 title="Extensible Markup Language">XML</font> saved file to the following line :


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<R</syntaxhighlight>
<Real name="Real:">0.0E0</Real>
</syntaxhighlight>
</syntaxhighlight>



Version du 25 mars 2026 à 13:15

== 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>