Review request for 7132692: [macosx] Class com.apple.eawt not functioning
Anthony Petrov
anthony.petrov at oracle.com
Mon Feb 13 06:53:32 PST 2012
Hello,
Please review a fix for http://bugs.sun.com/view_bug.do?bug_id=7132692 at:
http://cr.openjdk.java.net/~anthony/x-16-eawt-7132692.0/
With this fix we postpone the initializing of an instance of the
ApplicationDelegate class and setting the delegate to the NSApp until
after the application itself has been fully initialized. The
QueuingApplicationDelegate in libosxapp.dylib will queue all incoming
notifications and resend them to the real ApplicationDelegate once it's
installed.
Note that it is still not completely clear to me why we must postpone
creating the delegate. It seems that it may be somehow related to
loading the nib file which is happening in NSApplicationAWT
-finishLaunching: method.
Given that:
1) the QAD ensures we don't miss any notifications,
2) the test application starts working correctly after this patch (i.e.
the About, Preferences, and Quit menu items generate the expected eawt
events), and
3) there doesn't appear to be an obvious requirement for the
ApplicationDelegate to be initialized earlier,
I consider this fix is OK. Also, it seems that the fix resolves 7130377
([macosx] Adding Preferences menu results in NPE) as well.
--
best regards,
Anthony
More information about the macosx-port-dev
mailing list