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.