User Tools

Site Tools


tutorials:first-steps:save-load

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tutorials:first-steps:save-load [2025/05/25 11:09] gaetantutorials:first-steps:save-load [2025/05/26 23:56] (current) barley1965
Line 1: Line 1:
 ====== Save/load static variables ====== ====== Save/load static variables ======
  
-This tutorial cover how to save/load static parameters in your projects.+This tutorial covers how to save/load static parameters in your projects.
  
 ===== Create project ===== ===== Create project =====
  
-In a ''newRGG'' project, add a new file called "paramfile". (in the file explorer click "new>file>" enter paramfile - no extensions).+In a ''newRGG'' project, add a new file called "paramfile". (in the file explorer click "new>file>"enter paramfile - no extensions).
  
 {{:tutorials:first-steps:parafile.png?200|}} {{:tutorials:first-steps:parafile.png?200|}}
Line 75: Line 75:
 **Note:**    **Note:**   
   * The variable ''myFloat'' is not included in the ''save'' and ''load'' methods. As a ''global'' it is automatically included in GroIMP serialization.   * The variable ''myFloat'' is not included in the ''save'' and ''load'' methods. As a ''global'' it is automatically included in GroIMP serialization.
-  * Any other serialization methods can be used. Here we "simply" write varName=varValue as string in a text file. But, any other approach would work (e.g. write in csv, ...). The file do not have to be within the project (as ''paramfile'' is). +  * Any other serialization method can be used. Here we "simply" write varName=varValue as string in a text file. However, any other approach would work (e.g. write in csv, ...). The file does not have to be within the project (as ''paramfile'' is). 
   * To reset the three variables to their initial values, the project needs to be either ''recompiled'' or ''reset''.   * To reset the three variables to their initial values, the project needs to be either ''recompiled'' or ''reset''.
  
tutorials/first-steps/save-load.1748164185.txt.gz · Last modified: 2025/05/25 11:09 by gaetan