flex builder 4.6 では、am sql クエリからデータをバインドしようとして<s:List>
います。<s:Textarea>
私のコードは次のとおりです。
<s:List id="listapagar" x="304" y="276" width="330" height="42" borderVisible="false"
color="#FF0000" dataProvider="{dataProvider}" enabled="false" fontSize="22"
fontStyle="italic" fontWeight="bold" labelField="nome" textAlign="center"
textDecoration="underline">
<s:itemRenderer>
<fx:Component>
<s:ItemRenderer>
<s:TextArea id="apagar" width="330" height="42" text="R$ {data.valorapagar}" />
</s:ItemRenderer>
</fx:Component>
</s:itemRenderer>
</s:List>
そしてここで、私のSQLは次のように表示されます<s:list>
:
protected function buttonX():void
{
var sqlConnection:SQLConnection = new SQLConnection();
sqlConnection.open(File.applicationDirectory.resolvePath("testeDb.sqlite"));
var stmt:SQLStatement = new SQLStatement();
stmt.sqlConnection = sqlConnection;
stmt.text = "SELECT * FROM comandatual order by numerodatransacao desc limit 1 ";
stmt.execute();
dataProvider = new ArrayCollection(stmt.getResult().data);
}
その後、s:TextArea id="apagar" に表示された結果を取得し、別のテキスト領域にバインドして、次のように単純なマイナス計算を実行しようとしています。
<fx:Binding source="apagar.text" destination="restroco.text"/>
<fx:Model id="Calculos" >
<Calculos>
<!-- Perform a calculation. -->
<a>{(Number(restroco.text)) - 3}</a>
</Calculos>
</fx:Model>
しかし、現時点では、flex は先に進めないエラーを返します。
1120: 未定義のプロパティ apagar へのアクセス。フレックスの問題
誰かが私の完全なコードを見たい場合は、ここにいます: