3 Replies Latest reply on Feb 27, 2012 6:50 PM by KimHJ50

    PersistenceManager and class

    KimHJ50

      I'm new to flex using Flashbuilder 4.6, I'm trying to save the users data with presistenceManager.

       

      When I try to read the data back all that shows is the word: "mySetup" no data, what did I do wrong?

       

      I made a .as file with this.

       

      package LocalData

      {

                      [Bindable]

                      public class MySetup

                     {

                          public var myName:String;

                           public var myStreet:String;

                           public var myCity:String;

                           public var myPhone:String;

                           public var myPin:String;

                      }

      }

       

      In my view (.mxml) I do this:

       

      protected function saveButton_clickHandler(event:MouseEvent):void

      {

      var saveManager:PersistenceManager = new PersistenceManager();

      var mySetup:MySetup = new MySetup;

       

      mySetup.myName = myName.text;

      mySetup.myPhone = myPhone.text;

      mySetup.myStreet = myStreet.text;

      mySetup.myCity = myCity.text;

      mySetup.myPin = myPin.text;

       

       

      saveManager.setProperty("setupData", "mySetup");

      saveManager.save();

      }

       

      Thanks, Kim