Adobe Air Notification Demo
To go along with my previous post I have put together a demo so that you can download the source and see how the notifications work. As I was starting to zip up the source code I saw a comment on my previous post from Ray that made me think about a possible issue. Running a test using task manager, I quickly saw that every time I clicked the button to display the notification the memory used by AIR rose a little. With every click it rose higher and higher and never went back down. The problem was the main app window spawned a new window for the notification but never closed that window. I was able to solve this by using air.Timer. It sets up a timer that runs a function once it reaches the limit you provide. So setting this number a second or so after the notification fades out, allows it to close the notification window via nativeWindow.close();
The source code is below. If you are using Aptana Studio, you should be able to promote it to a project and then run it. I am open to suggestions on how to streamline this if possible.