When I compiled “flex3_sdk ->samples ->explorer ->containers ->SimpleTitleWindowExample.mxml” with mxmlc and run it,i got the error below:
Error: No class registered for interface ‘mx.styles::IStyleManager2′.
at mx.core::Singleton$/getInstance()
at mx.styles::StyleManager$/get impl()
at mx.styles::StyleManager$/http://www.adobe.com/2006/flex/mx/internal::initProtoChainRoots()
at simpleTitleWindowExample/http://www.adobe.com/2006/flex/mx/internal::_SimpleTitleWindowExample_StylesInit() at SimpleTitleWindowExample()
Maybe it’s too simple for you,but i spend too much time fixing this error. I found there was a comment like below:
<?xml version="1.0" encoding="utf-8"?> <!-- Simple custom MXML TitleWindow component. The TitleWindowApp application displays this component. You cannot run it independently. -->
Yes,it denpends on another mxml and can not be directly run.:)

January 31st, 2008
Ntt.cc 








Posted in
Tags: 
RSS Feed
Email Feed
Hi,
I ran into this same problem whilst compiling an actionscript project. I fixed it by adding the line :
Singleton.registerClass(”mx.styles::IStyleManager2″, Class(ApplicationDomain.currentDomain.getDefinition(”mx.styles::StyleManagerImpl”)));
as the first line in my constructor.
Hope this is useful,
Sam
[...] The error that "No class registered for interface ‘mx.styles::IStyleManager2′"… [...]
[...] reading this, I found out I was unintentionally running/debugging a flex component instead of a flex [...]
Hi all,
Thanks Sam, I’ve already done the Singleton.registerClass thing. But now I have a new issue, When i compile I see ‘value is not a function’ when Singleton calls c['getInstance']() function.
That function is there in IBrowserManager but still don’t reconigsed.