Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open Handler, when is it called?



I don't have a definitive answer for you on this but there's a related issue that I encountered that might be important to keep in mind.

In my experience dealing with this on MacOS 9, the constructor and start methods seem to occur before the openDoc handler is called but there is some inconsistency in the order of the calls to the MRJ openApp and openDoc handlers.

The order in which the two handlers are called appears to depend on whether other events are generated during the startup period.

If the application is allowed to start up without any mouse motion, the handlers are called in a different sequence than when the mouse is moved a lot.

I had to work around this issue in my code to determine when to show a new untitled document.

Les


>When is the MRJOpenDocumentHandler called? Is that defined? What does it
>depend on?
>
>I have an application which does the following:
>
>public class MyApp
>{
> public static void main(String[] args)
> {
> new MyApp().start();
> }
>
> public MyApp()
> {
> // [...]
> }
>
> public void start()
> {
> // [...]
> }
>}
>
>When I run it on my machine, I see that the constructor and the start()
>method are both called before the MRJOpenDocumentHandler get called. I need
>to know if this is something I can rely on or if this is dependant on
>something.
>
>Steve
>
>--
>Steve Roy <email@hidden>




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.