DISQUS

DISQUS Hello! toxicsoftware.com is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Jump to original thread »
Author

Grab that Invocation

Started by schwa · 10 months ago

CInvocationGrabber is a Cocoa class to help with creating NSInvocation objects.

NSInvocation objects are Cocoa’s equivalent of “functors” and are extremely handy. But unfortunately creating them is often a pain. For example, take the following code showing ... Continue reading »

3 comments

  • Nice work! One possible enhancement might be to change the invocation "capture" so that it can record multiples on an array. Then the client could ask for an array of all invocations sent to it. It could even sport a "performInvocationsOnObject:" method.

    Also, the name "CInvocationRecorder" might better represent what this thing does, especially if multi-recording was added.
  • Thanks,

    I have just started using NSInvocation, and this will be useful.

    Also there is a bug in your first code box, you have &firstArgument twice.
  • Great work; saved me a bunch of time writing this myself.

Add New Comment

Returning? Login