using objc_msgSend to call a Objective C function with named arguments

Posted by Markus Pilman on Stack Overflow See other posts from Stack Overflow or by Markus Pilman
Published on 2010-04-04T07:08:20Z Indexed on 2010/04/04 7:13 UTC
Read the original article Hit count: 591

Filed under:
|
|

Hi all,

I want to add scripting support for an Objective-C project using the objc runtime. Now I face the problem, that I don't have a clue, how I should call an Objective-C method which takes several named arguments.

So for example the following objective-c call

[object foo:bar];

could be called from C with:

objc_msgSend(object, sel_getUid("foo:"), bar);

But how would I do something similar for the method call:

[object foo:var bar:var2 err:errVar];

??

Best Markus

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about reflection