Remember values of instance variables

  • 27 favourites



7,613 visits, 16,040 views



This tutorial hasn't been translated.


This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Ok, let’s rock now:

Create more instances of the TextBox-object in both layouts. (Pressing the control-key and dragging the instance in the layouteditor will create a new instance.)

The saving works this way:

How the values get saved? I build a long "textstring" with the character “|” to separate the different values. For showing the created "textstring" I create a new Text-Object – “debugText” and disable some actions in the "Event sheet 1". (Link to see it - Example 2)

The preview shows this:

Two little flaws are left: It works only once properly because the second time the new strings entries get appended at the string you see above. Second issue is that it doesn’t work properly when you type a “|” in a TextBox. How to clear these issues: 1) the global variable is reseted to an empty-text "" everytime when the button is clicked. 2) every typed in character "|" is replaced with a "," before it get saved. ;)


  • Order by
Want to leave a comment? Login or Register an account!