« Modified data » : différence entre les versions

De GENIUS
Aller à la navigation Aller à la recherche
Aucun résumé des modifications
Aucun résumé des modifications
 
(Une version intermédiaire par le même utilisateur non affichée)
Ligne 8 : Ligne 8 :


For example, imagine that the initial value of an integer is 0.
For example, imagine that the initial value of an integer is 0.


[[File:ModifiedData1.jpg]]
[[File:ModifiedData1.jpg]]


Then, if the user will enter "1" as a new value => " <font color=#FF0000>*</font> " character appears
Then, if the user will enter "1" as a new value => " <font color=#FF0000>*</font> " character appears


[[File:ModifiedData2.jpg]]
[[File:ModifiedData2.jpg]]


At last, if the same user will reenter "0", the " <font color=#FF0000>*</font> "character will disappear
At last, if the same user will reenter "0", the " <font color=#FF0000>*</font> "character will disappear


[[File:ModifiedData1.jpg]]
[[File:ModifiedData1.jpg]]


It is possible to manage locally this mechanism using the following methods:
It is possible to manage locally this mechanism using the following methods:
Ligne 26 : Ligne 32 :
=== Management with read/write and copy/paste functions ===
=== Management with read/write and copy/paste functions ===


The "*" character could also appeared (or not) after reading or writing a configuration file (see [[.:greadwrite|GReadWrite interface and data files management]] topic). It is managed by using a flag set to true or false :
The "*" character could also appeared (or not) after reading or writing a configuration file (see [[GReadWrite_interface|GReadWrite interface and data files management]] topic). It is managed by using a flag set to true or false :


* when calling <font color=#4169E1>GFileManipulation.readConfig()</font> method, if the flag is set to false, an "*" will appear (of course, if the read value is different of the previous one)
* when calling <font color=#4169E1>GFileManipulation.readConfig()</font> method, if the flag is set to false, an "*" will appear (of course, if the read value is different of the previous one)

Dernière version du 5 mai 2017 à 09:32

Sometimes, a " * " character appears just after a label of an entry data widget. In fact, it occurs when the data has been modified by user by comparison to a “saved” value. More precisely, this “saved” value corresponds:

  • either to the default value at the first display (the one used at the instantiation),
  • or to the data loaded (resp. saved) when reading (resp. writing) a file => after reading (resp. writing) a file, the " * " character disappears

When a unit is changed, as the data is not actually changed because the value stored in memory is not changed and no " * " character appears.

Idem, if the user enter a “new” value which, in fact, corresponds to the "saved" value, the " * " character will disappear :

For example, imagine that the initial value of an integer is 0.


ModifiedData1.jpg


Then, if the user will enter "1" as a new value => " * " character appears


ModifiedData2.jpg


At last, if the same user will reenter "0", the " * "character will disappear


ModifiedData1.jpg


It is possible to manage locally this mechanism using the following methods:

  • setDisplayIsModifiedIndicator(DisplayIndicatorStatus), the status being « Automatic », « Always » or « Never »
  • setSavedValue() to change manually the saved value => if the saved value is the same as the current displayed one, the "*" character will disappear

Management with read/write and copy/paste functions

The "*" character could also appeared (or not) after reading or writing a configuration file (see GReadWrite interface and data files management topic). It is managed by using a flag set to true or false :

  • when calling GFileManipulation.readConfig() method, if the flag is set to false, an "*" will appear (of course, if the read value is different of the previous one)
  • on the contrary, by using the GFileManipulation.writeConfig() method, if the flag is set to true, the "*" will disappear after writing the configuration file (considering the reference configuration is then the one described in the file).

But of course, you may decide another way to run ...


Return to the introduction ↑ Go to the next page →