Re: NSDocumentController didCloseAllSelector
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