1 Reply Latest reply on Jan 3, 2007 1:28 PM by KomputerMan.com

    Writing to an Object

    KomputerMan.com Level 1
      O.K. I'll admit it... I am still a little hung over from watching my Broncs put the BS into BCS. But after going to their games for the last quarter century I think I, and all Bronco fans, are entitled to party a bit... But through the haze I still need to get some things accomplished. So here goes...

      I create an object using Action script like this...
      public var selectedClaimant:Object;

      Then I have a datagrid contorl that contains a bunch of stuff. When I click on an item in the datagrid I do this:
      selectedClaimant = event.KDL_SelObject;

      All this works fine without any problems. My problem is there are other times that I need to set the values in the selectedClaimant object manually. For instance there is an element in the selectedClaimant object called FName. My question is how do I manually write a value to this object??? I've tried :

      selectedClaimant.FName = event.claimantToAdd.FName;

      but I get an error message about writing to a null object. The event.claimantToAdd contains all of the elements, plus a few more that the selectedClaimant object contains. Any help with getting me through this fog would be appreciated!!!

      How 'bout them Broncos!!!
      KomputerMan ~|:-)
        • 1. Re: Writing to an Object
          KomputerMan.com Level 1
          duh... I guess it would help to instantiate the object after I create it. Just adding this line before I try writing to it helps!!!

          selectedClaimant = new Object;

          I also had to add that line before the data grid select event to keep tings tidy.

          How 'bout them Broncos!!!
          KomputerMan ~|:-)