2 Replies Latest reply on Sep 9, 2009 12:21 PM by Jens Wegar

    extending spark.components.Application

    Jens Wegar

      I'm trying to extend the spark.components.Application component, but I'm getting the following compiler error when I actually try to use my subclass:


      Could not resolve <s:layout> to a component implementation.


      I have the namespaces set up as per the default when you create a new spark component. Anyone know what I'm doing wrong? Below is the code I'm using:


      In the subclass (WidgetBase.as)

      package platform.plugins
           import spark.components.Application;


          public class WidgetBase extends Application
                                   implements IWidgetBase
               public function WidgetBase()
               public function getServiceClass(name:String):*
                   trace("should fetch service class = "+name);
                   return null;



      Using WidgetBase in MXML:

      <?xml version="1.0" encoding="utf-8"?>
      <plugins:WidgetBase xmlns:plugins="platform.plugins.*"


              <s:BasicLayout />
          <views:ProspectInfo left="50" top="100" />


      So for some reason the compiler doesn't find the s:layout implementation. It does however find other spark components, such as s:Button, s:CheckBox etc. Why, is the question?