Hi,
I created a class 'Company' with 2 properties(ie... name, models).
and then 'CompanyFactory' class. Here is the 'CompanyFactory' class.
package com.ascript
{
import mx.collections.ArrayCollection;
public class CompanyFactory {
static public var companies:ArrayCollection;
static public function getCompanies():ArrayCollection {
if(companies == null) {
trace("Before defining");
companies = new ArrayCollection();
trace("After defining");
companies.addItem( new Company("Comp1", ["c1", "c2"]));
companies.addItem( new Company("Comp2", ["s1", "s2" , "s3"]));
companies.addItem( new Company("Comp3", ["n1"]));
}
return companies;
}
}
}
In another class called CompanyData. I started accessing companies
data using
var companies:ArrayCollection = CompanyFactory.getCompanies();
And finally I created one component mxml file(CompTree.mxml):
<?xml version="1.0" encoding="utf-8"?>
<local:CompaniesData xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns:local="com.ascript.*">
<mx:...>
.....
....
</mx:...>
</local:CompaniesData>
I compiled this using mxmlc CompTree.mxml. and when I loaded
CompTree.swf in to the browser It started throwing the following
Error.
Error: No class registered for interface
'mx.resources::IResourceManager'.
at mx.core::Singleton$/getInstance()
at mx.resources::ResourceManager$/getInstance()
at mx.collections::ListCollectionView()
at mx.collections::ArrayCollection()
at com.ascript::CompanyFactory$/getCompanies()
at com.ascript::CompaniesData()
at com.views::CompTree()
Its not giving any trace statments after running the "companies = new
ArrayCollection();" in CompanyFactory's getCompanies method.
Can any one help me to get rid of this.
What is this problem exactly mean?
Looking for your reply.
Thanks,
Anil