Modified data
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.
Then, if the user will enter "1" as a new value => " * " character appears
At last, if the same user will reenter "0", the " * "character will disappear
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 ...