1 Reply Latest reply on Jan 31, 2007 10:16 PM by Robert S-Hfz2MF

    data assignment

    Robert S-Hfz2MF Level 1
      I have a component for an <mx:List /> that I have built. The problem I am having is that I have a class that I would like to assign the variables withing the component as well as have the labels show some data of the dataprovider (currently an ArrayCollection).

      The problem is that the assignment variable declaration (_person.name = data.Name) in the initThis() throws a null exception while the data.Name in the bindable section of the LinkButton's lable property works fine. Any help would be greatly apprecieated.


      <mx:HBox xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="initThis()" >
      import dto.Person;

      [Bindable] private var _person:Person;

      private function initThis():void{
      _person = new Person();

      <mx:LinkButton label="{data.Name}" width="25%" click="{mx.controls.Alert.show('You clicked: '+_person.name)}"/>