User Tools

Site Tools


built_in:save_text

Differences

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

Link to this comparison view

built_in:save_text [2015/03/21 17:12]
madlyr [Description]
built_in:save_text [2020/07/07 16:56]
Line 1: Line 1:
-=====SaveText===== 
  
-//(Information and examples taken from the DroidScript documentation)// 
- 
-====Description==== 
- 
-The **SaveText** method saves a text **value** to the user's storage space under **valueName**. Use this method when saving and loading user preferences. 
- 
-The third parameter **id** is an optional text parameter and allows sharing of data across multiple Apps when the same id is used by both apps. 
- 
-<code> app.SaveText( valueName, value, id );</code> 
- 
-See also [[built_in:load_text|LoadText]] 
- 
----- 
- 
-====Example==== 
- 
-<code javascript> 
- 
-function OnStart() 
-{ 
-  name = app.LoadText( "MyName", "Bill" ); 
-  app.ShowPopup( name ); 
- 
-  if( name=="Bill" ) name = "Fred"; 
-  else name = "Bill"; 
-  app.SaveText( "MyName", name ); 
-}   
- 
-</code> 
built_in/save_text.txt ยท Last modified: 2020/07/07 16:56 (external edit)