Question

I am trying to use Parsley framework on my application. I am able to include all my custom components (written in mxml) and other mxml files in Parsley's configuration file like this,

<components:Panel1/>
<components:Panel2/> 

etc ..

But, I have some actionscript files, that have a constructor expecting a mandatory argument. So, when I try to include that actionscript file in Parsley's Configuration file, it shows me an error like below .. e.g CustomPanel.as

In Parsley's config file ..

<components:Panel1/>
<components:Panel2/> 
.
.
<custom:CustomPanel/>    // Error line .. 

Error :1136: Incorrect number of arguments. Expected 1.

So, my question is,

How to include such ActionScript files,which have a necessary argument in its constructor, in Parsley's configuration file, so that I can use that actionscript file in Parsley's messaging system.

Thanks

Was it helpful?

Solution

I am not sure... But this should be a problem...

Your CustomPanel.as class will be required one argument in CustomPanel constructor...

When we are adding any class to in our MXML parsley context, it will create its object. So one argument is required for creating your CustomPanel class object.

So it is giving error....

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top