You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by an...@apache.org on 2019/12/25 10:46:13 UTC

[royale-docs] branch master updated: Update localsharedobject.md

This is an automated email from the ASF dual-hosted git repository.

andreww pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/royale-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new fccb381  Update localsharedobject.md
fccb381 is described below

commit fccb381e1fb219d8ed0f1b85d5381a59a4dce129
Author: Andrew Wetmore <an...@cottage14.com>
AuthorDate: Wed Dec 25 06:46:07 2019 -0400

    Update localsharedobject.md
    
    Starting to populate this page, based on http://blog.flexdevelopers.com/2010/01/flex-basics-local-shared-object.html
---
 .../loading-external-data/localsharedobject.md     | 39 ++++++++++++++++++++--
 1 file changed, 36 insertions(+), 3 deletions(-)

diff --git a/features/loading-external-data/localsharedobject.md b/features/loading-external-data/localsharedobject.md
index 38aaeac..6c123c2 100644
--- a/features/loading-external-data/localsharedobject.md
+++ b/features/loading-external-data/localsharedobject.md
@@ -15,12 +15,45 @@
 # limitations under the License.
 
 layout: docpage
-title: LocalSharedObject
-description: LocalSharedObject
+title: Local Shared Object
+description: Use LocalSharedObject to store user or session data
 permalink: /features/loading-external-data/localsharedobject
 ---
 
-# LocalSharedObject
+# Local Shared Object
+
+Store user data in the equivalent of a cookie
+
+Web browsers often store small amounts of data on a user's computer in a "cookie", a set of one or more name-value pairs in text. This information can be useful for session management and customizing the UI to match the user's needs and interests. Cookies have a bit of a bad name, though, because many applications and websites also use them for tracking user behavior and recording data the application really does not need in order to function.
+
+Instead of using cookies, your Royale application can use Local Shared Objects to store data on a user's computer. Local Shared Objects 
+
+* can store up to 100 kb of data without asking the user's permission, much more than a cookie (4 kb).
+* can store not only text values, but Number, String, Boolean, XML, Date, Array and Object name-value pairs.
+* can even store instances of a custom class, if the class is registered using the _RemoteCass_ -metadata tag.
+* have whatever name you give them, with the _.sol_ file type
+
+## Create and retrieve a Local Shared Object
+
+_information coming soon_
+
+## Access and update Local Shared Object values
+
+_information coming soon_
+
+## Save a Local Shared Object
+
+_information coming soon_
+
+## Delete a Local Shared Object
+
+Use the _clear()_ method (``` public function clear():void ```) to delete a Local Shared Object and erase its data. If the Local Shared Object's name is "loginInfo", we could clear and delete it like this:
+
+```
+var so:SharedObject = SharedObject.getLocal("loginInfo");
+so.clear();
+```
+