6 Replies Latest reply on May 2, 2009 11:27 AM by AlexZ2009

    No class registered for interface mx.styles::IStyleManager2'

    Dean Schulze
      When running a Flex application created with the Flex Builder 3 plugin to Eclipse I get this error:

      Error: No class registered for interface mx.styles::IStyleManager2'.
      at mx.core::Singleton$/getInstance()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\ Singleton.as:111]
      at mx.styles::StyleManager$/get impl()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\styles\StyleManager.as:78]
      at mx.styles::StyleManager$/ http://www.adobe.com/2006/flex/mx/internal::initProtoChainRoots()[E:\dev\3.1.0\frameworks\ projects\framework\src\mx\styles\StyleManager.as:144

      A google search turned up a work-around using Singleton so I added this code:

      mx.core.Singleton.registerClass(
      "mx.styles::IStyleManager2",
      Class(
      ApplicationDomain.currentDomain.getDefinition(
      "mx.styles::StyleManagerImpl")));

      Now when I go to the URL I get:

      TypeError: Error #1010: A term is undefined and has no properties.
      at mx.styles::StyleManagerImpl/initProtoChainRoots()[E:\dev\3.1.0\frameworks\projects\framew ork\src\mx\styles\StyleManagerImpl.as:357]
      at mx.styles::StyleManager$/ http://www.adobe.com/2006/flex/mx/internal::initProtoChainRoots()[E:\dev\3.1.0\frameworks\ projects\framework\src\mx\styles\StyleManager.as:144


      I'm getting closer as I move down the stack trace, but I still don't know what in my MXML or <mx:script> is causing this.

      Has anyone else run into this? Do you know what causes it or at least how to avoid it?

      Thanks.