I am using parsley and cairngorm framework for my flex project.During my flex implementation I faced two common error like null object reference,value is not a function.This error will occur while trying to inject action script class file.
We need to check below three when you use parsley,cairngorm framework.
1.
[Bindable]
[Inject]
public var nmsLoginPanelPM:NMSLoginPanelPM;
When you trying to inject object declare the var as public instead of private.
2.Use proper namespace
xmlns:spicefactory=”http://www.spicefactory.org/parsley” xmlns:cairngorm=”http://ns.adobe.com/cairngorm”
3.use following tag in declaration section
<fx:Declarations>
<spicefactory:Configure />
</fx:Declarations>
4.And Don’t forget to add action script model file(like NMSLoginPanelPM) in context file
5.Once you inject don’t create the same class object using following method
public var nmsloginPM:NMSLoginPM = new NMSLoginPM
If you follow above steps you can avoid null object reference problem and value is not a function.If you have any comments let me know.
