I use Item Renderer in List control. But when drag started I get error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at MemberRenderer/set data() etc.
Can anybody help me? My ItemRenderer:
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" horizontalScrollPolicy="off" height="19" verticalAlign="middle" horizontalGap="4">
<mx:Script>
<![CDATA[
import vos.Person;
import assets.Icons;
private var person:Person;
private var _data:Object;
override public function set data(value:Object):void
{
person = value as Person;
_data = value ;
if (data != null)
{
fullName.htmlText = person.current ? "<b>" + person.fullName + "</b>" : person.fullName
role.source = person.role == Person.ROLE_LEADER ? Icons.leader : Icons.user;
cameraImage.source = person.camera == true ? Icons.video : null;
micImage.source = person.mic == true ? Icons.speak : null ;
}
}
override public function get data():Object
{
return _data ;
}
]]>
</mx:Script>
<mx:Image id="role" />
<mx:Label id="fullName" width="100%" />
<mx:Image id="cameraImage" />
<mx:Image id="micImage" />
</mx:HBox>