2 Replies Latest reply on Nov 7, 2007 6:00 AM by CKLThomco

    Creating custom Class

    CKLThomco
      I have the following class definition that works great :
      package com
      {
      [Bindable]
      public class Person
      {
      private var _name:String;
      private var _mailingAddress:String;
      private var _mailZip:String;
      private var _mailState:String;
      private var _mailCity:String;

      public function get name():String {
      return _name;
      }

      public function set namedInsured(value:String):void {
      _namedInsured = value;
      }

      public function get mailingAddress():String {
      return _mailingAddress;
      }

      public function set mailingAddress(value:String):void {
      _mailingAddress = value;
      }

      public function Insured() {}
      }
      }

      I want to replace all the address items (mailingAddress, mailingCity, etc) so that it has subproperties for each address
      element... IE mailingAddress.line1, mailingAddress.city, mailAddress.state, etc
      How do I define the getters and setters for that ?

      Thaks,