Strange behivor when our document-based Cocoa application launch on lion
Strange behivor when our document-based Cocoa application launch on lion
- Subject: Strange behivor when our document-based Cocoa application launch on lion
- From: qiang zhu <email@hidden>
- Date: Thu, 08 Dec 2011 18:54:48 +0800
Hello group,
Our application use document-based architecture and works well on snow
leopard, below are the call sequences:
1, when user launch our application, our application's delegate's method "-
applicationOpenUntitledFile:" is called.
2, when user double click a document which our application can recognize,
our application's delegate's method "- application:openFiles:" is called.
But when on lion, those sequences are changed:
1, when user launch our application, NSDocumentController's
"openDocumentWithContentsOfURL:display:completionHandler" is called, and
the last opened document's path is passed into this method. Our
application's delegate's method "- applicationOpenUntitledFile:"
will never be called.
2, when user double click a document which our application can recognize,
again, NSDocumentController's
"openDocumentWithContentsOfURL:display:completionHandler" is firstly
called, then our application's delegate's method "- application:openFiles:"
is called.
I also found that this strange behivor is only occured when I quit our
application using cmd+q, if I quit our application using cmd+w or by
closing the main window, everything is normal again.
Can anyone tell the cause or any cue to find the root cause will be
appreciated.
Thanks
Qiang
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden