Flex Parsley,Cairngorm Framework Injection Problems

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.

Flex Parsley Framework Inject Problems

We need to check below three when you use parsley 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

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.

About mohan

This is Mohan Jayapalan author of TechPages Blog.I am a part time blogger and Currently working for private Software Concern.

© Copyright 2010-2016 www.techpages.org · All Rights Reserved · Powered by WordPress ·