I've got a Mac Java application in which at startup I want to display:
(1) a file chooser if the user double-clicks the application icon or
selects the application in the dock.
(2) the specified file if the user double-clicks on a data file or
drags a data file onto the application icon.
I've no problem with case (1), but with case (2) I'm getting both the
specified file AND the file chooser displayed. My pseudocode is as
follows:
Display the zero size 'background' frame used to host the screen bar
Create the com.apple.eawt.Application
Add the com.apple.eawt.ApplicationListener
if (no data files open) {
display file chooser
}
What seems to be happening is that the application events don't get
processed immediately after adding the ApplicationListener, so that
the 'no data files open' test returns 'true' instead of 'false' as
intended. The application event only gets processed after the file
chooser has been displayed and is waiting for user input.
Is there any way that I can "force" the application event to be
processed (before the 'no data files open' test), or any other
solution that anyone can suggest?
Russ Calvert
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden