我的错误#1010情况

new*_*ser 6 apache-flex flex3 actionscript-3

编辑3: 好的,我正在点亮Windows Server 2008 R2虚拟机,安装Flex Builder 3,看看我是否可以获得一个新项目来正确编译和执行. 新闻! 我启动了IDE并在VM中运行,并且在编译代码之后我仍然得到了同样的错误!这里有一个很大的,有力的双重你.

编辑2: 由于这已经是一个很长的帖子,我会把它放在这里.我刚刚完成并单独删除了两个问题行的每一部分,并尝试在每一行之后进行编译,每次都得到错误.我甚至删除了两个内部的所有东西DataGridColumn,它仍然没有编译,即使注释掉两个空<mx:DataGridColumn />行将让程序加载!这让我疯了,任何人都可以为我解释这个问题吗?
/编辑2

我有一个AIR应用程序,当我点击F5时显然可以正常编译,但在应用程序有机会加载之前我得到以下错误:

我的错误消息.

通过注释掉代码块,我将问题缩小到两个特定的行.

<mx:DataGrid id="grid1" width="100%" height="100%" editable="false">
    <mx:columns>
        <mx:DataGridColumn headerText="Symbol"                      dataField="Symbol"             headerWordWrap="true" width="100" textAlign="left"/>
        <mx:DataGridColumn headerText="Description"                 dataField="FullName"           headerWordWrap="true" width="150" textAlign="left"/>
        <mx:DataGridColumn headerText="Trans"                       dataField="TransactionCode"    headerWordWrap="true" width="75"  textAlign="center"/>
        <mx:DataGridColumn headerText="Quantity"                    dataField="Quantity"           headerWordWrap="true" width="50"  textAlign="right"  labelFunction="formatUtil3"/>
        <mx:DataGridColumn headerText="Execution Date"              dataField="ExecutionDate"      headerWordWrap="true" width="80"  textAlign="center"/>
        <mx:DataGridColumn headerText="Execution Price"             dataField="ExecutionPrice"     headerWordWrap="true" width="65"  textAlign="right"  labelFunction="formatUtil1"/>
        <mx:DataGridColumn width="15" backgroundColor="0x888888" dataField="blank1" headerText=""/>
        <mx:DataGridColumn headerText="Previous Business Day"       dataField="PreviousDate"       headerWordWrap="true" width="80"  textAlign="center"                             itemRenderer="PD5"/>
<!---->     <mx:DataGridColumn headerText="Previous Business Day Price" dataField="PreviousDatePrice"  headerWordWrap="true" width="65"  textAlign="right"  labelFunction="formatUtil1" itemRenderer="PD5"/>
<!---->     <mx:DataGridColumn headerText="% Difference"                dataField="PreviousDateDelta"  headerWordWrap="true" width="65"  textAlign="right"  labelFunction="formatUtil2" itemRenderer="PD5"/>
        <mx:DataGridColumn headerText="Source"                      dataField="PreviousDateSource" headerWordWrap="true" width="100" textAlign="left"                               itemRenderer="PD5"/>
        <mx:DataGridColumn width="15" backgroundColor="0x888888" dataField="blank2" headerText=""/>
        <mx:DataGridColumn headerText="Previous Month End"          dataField="PrevMonthEndDate"   headerWordWrap="true" width="80"  textAlign="center"                             itemRenderer="PME5"/>
        <mx:DataGridColumn headerText="Previous Month End Price"    dataField="PrevMonthEndPrice"  headerWordWrap="true" width="65"  textAlign="right"  labelFunction="formatUtil1" itemRenderer="PME5"/>
        <mx:DataGridColumn headerText="% Difference"                dataField="PrevMonthEndDelta"  headerWordWrap="true" width="65"  textAlign="right"  labelFunction="formatUtil2" itemRenderer="PME5"/>
        <mx:DataGridColumn headerText="Source"                      dataField="PrevMonthEndSource" headerWordWrap="true" width="100" textAlign="left"                               itemRenderer="PME5"/>
    </mx:columns>
</mx:DataGrid>
Run Code Online (Sandbox Code Playgroud)

这两行标有<!---->.如果我评论这两行,那么应用程序将正确编译,运行和显示,但如果我让其中任何一个处于活动状态,我会得到上面的错误.

这里发生了什么?

编辑:要求的附加代码 -

<mx:CurrencyFormatter id="format1" precision="5" useNegativeSign="false"/>
<mx:NumberFormatter   id="format2" precision="2"/>
Run Code Online (Sandbox Code Playgroud)

和功能 -

private function formatUtil1(item:Object, column:DataGridColumn):String
{
    var Field:Object = item[column.dataField];
    return format1.format(Field);
}

private function formatUtil2(item:Object, column:DataGridColumn):String
{
    var Field:Object = item[column.dataField];
    return format2.format(Field);
}
Run Code Online (Sandbox Code Playgroud)

接下来是PD5的.as文件 -

package
{
    import mx.controls.Label;
    import mx.controls.listClasses.*;

    public class PD5 extends Label
    {
        private const POSITIVE_COLOR:uint = 0x000000; // Black
        private const NEGATIVE_COLOR:uint = 0xFF0000; // Red 

        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
        {
            super.updateDisplayList(unscaledWidth, unscaledHeight);
            setStyle("color", (data.PreviousDateDelta >= 5 || data.PreviousDateDelta <= -5) ? NEGATIVE_COLOR : POSITIVE_COLOR);
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

现在PME5.as -

package
{
    import mx.controls.Label;
    import mx.controls.listClasses.*;

    public class PME5 extends Label
    {
        private const POSITIVE_COLOR:uint = 0x000000; // Black
        private const NEGATIVE_COLOR:uint = 0xFF0000; // Red

        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
        {
            super.updateDisplayList(unscaledWidth, unscaledHeight);
            setStyle("color", (data.PrevMonthEndDelta >= 5 || data.PrevMonthEndDelta <= -5) ? NEGATIVE_COLOR : POSITIVE_COLOR);
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

new*_*ser 0

由于到目前为止还没有解决我的问题,所以我决定完全回避它并将有问题的程序移植到 C#。到目前为止一切都运转良好。

懒惰回答?是的。
懒惰的解决方案?很不幸的是,不行。