I can't easily grab it right now, but it was basically a similar exception in UIComponent but to do with styles instead of the LayoutManager.
I managed to achieve what I wanted by changing my base file to an mxml implementing a WindowedApplication and setting its visibility to false. I'd still like to understand why I can't get it to work by extending Sprite like the sample app I linked to, but this will do in the meantime. :) Thanks for your help! Cheers, Mitch. --- In [email protected], "sunild999999" <sunilbd...@...> wrote: > > I think your guess to the problem is right on, your main application extends > Sprite, not NativeApplication. > > What was the exception you got when the app extended NativeApplication? > > Regards, > Sunil > > > --- In [email protected], "michob" <michob@> wrote: > > > > > > I just found a reference that is doing something very similar (see below); > > but somehow I still have problems with mine. > > > > http://www.adobe.com/devnet/air/flex/quickstart/creating_non-rectangular_windows.html > > > > Thanks again, > > Mitch. > > > > --- In [email protected], "michob" <michob@> wrote: > > > > > > Hi folks, > > > > > > I'm working on an AIR app that lives in the system tray / dock. It > > > should not have a visible window at startup, only a system tray icon. > > > After some event, I would like to create one of two windows (depending > > > on the event). I've got the system tray part working, but can't get the > > > window to open... > > > > > > TrayApp.as: > > > > > > > > > class TrayApp extends Sprite > > > { > > > // .... etc .... > > > > > > function processEvent() > > > { > > > var wnd:Window = new MyWindow(); > > > mywindow.open(); > > > } > > > // .... etc .... > > > } > > > > > > > > > > > > MyWindow.mxml: > > > > > > > > > <mx:Window xmlns:mx="http://www.adobe.com/2006/mxml" width="400" > > > height="300"> > > > <mx:Label text="hello, world"/> > > > </mx:Window> > > > > > > > > > > > > When I run this, I get an exception deep in UIComponent: > > > > > > TypeError: Error #1009: Cannot access a property or method of a null > > > object reference. > > > at > > > mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::updateC\ > > > allbacks()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\\ > > > UIComponent.as:5124] > > > > > > > > > I suspect that maybe I can't call the open() of Window from my app that > > > extends Sprite because some of the application framework is missing > > > (like layout managers, etc..). Maybe it has to extend > > > Application/NativeApplication instead? I tried that, but got another > > > odd exception. > > > > > > Anyone know how to do this? > > > > > > Thanks, > > > Mitch. > > > > > >

