I’m studying a demo code and it seems to me that an instance of a class is never instantiated, in particular I have this line:
<mx:Canvas ... currentState="{ model.state }">
...
[Bindable]
public var mod开发者_JAVA技巧el:MainUIPresentationModel;
If that’s not the case, please tell me, I’ll post the complete code.
@Constantiner Could it be:
<Injectors target="{ MainUI }">
<PropertyInjector targetKey="model" source="{ MainUIPresentationModel }"/>
</Injectors>
?
Gosh this was a Mate question not a flex4 question. :( Sorry guys.
You should understand that this declaration:
[Bindable]
public var model:MainUIPresentationModel;
is just declaration. The [Bindable]
metatag just lets others to handle changes of your target object (model
) automatically. But this metatag doesn't instantiate the value of the property you've declared.
So you need to assign a value to your declared property somewhere in your code corresponding your application's logic. Declaration is not enough.
精彩评论