Вопрос

I've followed the Adobe instrunctions on how to create an app without windows (link).

The gist is that you can do this by hiding or closing the original nativeWindow and creating a new one with theUTILITY or LIGHTWEIGHT property.

Unfortunately, when an application is launched more than once, the new nativeWindow is created again with each launch. This is highly undesirable. Anyone out there who knows how to prevent that from happening?

I've tried setting variables with the launch of the application, but it seems like these are not accessible by the new instances of the application. The weird thing is: AIR apps are not supposed to have multiple intances (should be impossible)! And there actually is only one instance according to the windows task manager and the fact that there is only one systemtray icon.

I'm making the application with Flash/AS3, I don't know yet how to use FlashBuilder/Flex.

I how hope so much that you have a solution!

Это было полезно?

Решение

I suspect what you're experiencing is that the already running app gets an INVOKED event and you handle that event by opening a new window, even if there's one open already?

That would explain there being only one instance of the application. You'd have to check if a window was already created in your app before creating a new one.

Hope this helps, Frank

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top