• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Strange behivor when our document-based Cocoa application launch on lion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Strange behivor when our document-based Cocoa application launch on lion
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: NSNetService getInputStream:outputStream: and ARC
  • Next by Date: Singletons with ARC
  • Previous by thread: Re: NSNetService getInputStream:outputStream: and ARC
  • Next by thread: Re: Strange behivor when our document-based Cocoa application launch on lion
  • Index(es):
    • Date
    • Thread