NSInvocation seems to be one of the worst designed functions in Cocoa, so I decided to check if anyone had written a recipe to make using it easier. I found a recipe on Matt Gallagher's blog. Now to be able to do this he used some quite hackish techniques.
- Would you recommend using this code or is this technique too likely to lead to a hard to debug error?
- If not, what would you recommend instead?
NSInvocation? It's a rather internal stuff you wouldn't usually use, unless you want to do something tricky. Usually, just calling the method itself, or using KVC suffices. So the recommendation depends on what you'd like to do. - Yuji