I'm building a custom Datagrid component, and I had three parameter properties:
[Collection] _columns
[Inspectable] _headerHeight
[Inspectable] _rowHeight
This all compiled fine, but I needed to change things about the _columns
variable, and it made sense to instead create _columnData
to store data from a DataProvider
.
Now it throws a ReferenceError
every time I try to Test Movie, saying that the property columnData
can't be created, despite listing it in the parameter list in the Flash Professional IDE.
The only thing I can imagine is that Flash is somehow caching an earlier version of my class, but that the Flash IDE is correctly updating itself according to my metadata when I rebuild the component. I've cleared out all the stuff from ~/Library/Application Support/Adobe/Flash CS5/CodeModel
, restarted Flash, deleted ASO files, I've moved all the files to a new machine, and even built the component from scratch (using the same class) in a new FLA - nothing has worked.
The code causing errors is copied below:
private var _columnData:Object;
private var _headerHeight:Number = 40;
private var _rowHeight:Number = 40;
[Collection(collectionClass="musicone.components.data.DataCollection", collectionItem="musicone.components.controls.datagrid.DatagridColumn", identifier="item")]
public function get columnData():Object {
return _columnData;
}
public function set columnData(value:Object):void {
_columnData = value;
var _forceClass:DataCollection = value as DataCollection;
//updateColumns();
draw();
}
[Inspectable(type="Number", defaultValue=40)]
public function get headerHeight():Number {
return _headerHeight;
}
public function set headerHeight(value:Number):void {
_headerHeight = value;
draw();
}
[Inspectable(type="Number", defaultValue=40)]
public function get rowHeight():Number {
return _rowHeight;
}
public function set rowHeight(value:Number):void {
_rowHeight = value;
draw();
}
EDIT: One of the main reasons I'm thinking my code is getting cached somewhere is that changes in the draw() function aren't being shown anywhere - in other words, the only place I can guarantee my changes are having an effect is in the Flash IDE. That said, the fact that the same error occurs on a different machine leads me to believe it's something intrinsic...