• 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
Re: NSDocumentController didCloseAllSelector
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocumentController didCloseAllSelector


  • Subject: Re: NSDocumentController didCloseAllSelector
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Wed, 30 Sep 2009 19:06:03 -0700


On Sep 30, 2009, at 6:42 PM, Graham Cox wrote:

I can't actually see an easy way to invoke the callback selector with the signature as given - you need to pass it the document (self), a BOOL and the contextInfo. You can invoke the method directly on the delegate easily enough, but since you're supposed to use the callback supplied, that might not work. The only way I can see to do it is to create an NSInvocation with the selector, set each argument and call invokeWithTarget: passing the delegate.

NSInvocation is the correct way to handle this. See the 10.5 release notes, and search for NSInvocation on that page:


http://developer.apple.com/mac/library/releasenotes/Cocoa/AppKitOlderNotes.html#X10_5Notes

That should bring you to a helpful discussion titled "Advice for Overriders of Methods that Follow the delegate:didSomethingSelector:contextInfo: Pattern."


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: NSDocumentController didCloseAllSelector
      • From: Graham Cox <email@hidden>
References: 
 >NSDocumentController didCloseAllSelector (From: Chris Idou <email@hidden>)
 >Re: NSDocumentController didCloseAllSelector (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Best Design Advice
  • Next by Date: Releasing NSSearchPathForDirectoriesInDomain causes crash
  • Previous by thread: Re: NSDocumentController didCloseAllSelector
  • Next by thread: Re: NSDocumentController didCloseAllSelector
  • Index(es):
    • Date
    • Thread