私はパセリフレームワークを使用しています。カスタム ビジュアル Tree コンポーネントにモデルを挿入しようとしています。
private var _model:Model
[Bindable]
public function get model():Model
{
return _model;
}
public function set model(value:Model):void
{
_model = value;
}
ビルド構成:
<Object id="customTree" type="{CustomTree}">
<Property name="model" idRef="model"/>
</Object>
次に、mxml でこのツリーを使用しました。
<components:CustomTree
id="categoriesTree"
width="100%" height="100%"
labelField="@title"
right="0" bottom="0" left="0" top="10"
doubleClickEnabled="true"
maxHorizontalScrollPosition="250"
horizontalScrollPolicy="auto"
dragEnabled="true"
dropEnabled="true"
dataProvider="{model.dataHolder}"
/>
親関数をオーバーライドしようとしましたが、エラーが発生しました。(モデルはヌル);
override protected function dragDropHandler(event:DragEvent):void
{
model.action = "drop"
}
モデルセッターにブレークポイントを設定しましたが、実行されましたが、モデルはまだnullです。
問題はどこだ?