I had no idea that SimpleApplication existed; it's not in my Flex 2.01 api 
docs. But then I looked in the source tree and indeed, there is an 
mx.core.SimpleApplication class. But the source reveals that it's just an empty 
subclass of MovieClip, so it can't be used in place of the Application class. I 
wouldn't be able to add any UIComponents to the display list without errors, 
since it seems that a UIComponent's entire ancestor chain must be made up 
entirely of other UIComponents.

Anatole Tartakovsky <[EMAIL PROTECTED]> wrote:            Try inheriting from 
SimpleApplication - you still will get all mixins for css and static linkage 
for generated code, but less of the framework initialization - you should be 
able to create screen and have controls there. Of course, fewer things 
depending on the global managers will work later on ... 
   
  Regards,
  Anatole Tartakovsky
  FarataSystems
  

 
  On 11/30/07, Dave Glasser <[EMAIL PROTECTED]> wrote:               I'm trying 
to create an Application in pure Actionscript, by subclassing 
mx.core.Application, and when I run it I get:
   
  TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
 at 
mx.core::UIComponent/getStyle()[C:\dev\flex_201_ja\sdk\frameworks\mx\core\UIComponent.as:7095]
  ...etc.
   
  The source file is basically an empty shell, with nothing but a constructor 
that calls super(). I'm not adding any children or setting any properties. It's 
not in the top-level package, if that makes any difference. 
   
  Is what I'm trying to do impossible, at least without adding some amount of 
setup code that is normally generated by the MXML preprocessor and isn't 
documented anywhere?
  
  






  

                         

Reply via email to