(objc:call object||class method-signature [arguments])


Call obj-c method-signature on object with optional arguments as required by signature


  object||class -- obj-c object to call method on or a class (string) to call

method-signature -- string representation of method signature

      arguments -- optional arguments to pass to init-signature.  args can be either objc-objects, reals, integers, strings (which get converted to NSString), #t or #f, or a list of 2 (NSSize,NSRange,NSPoint) or 4 (NSRect) elements.

Returns: obj-c object or false on fail

Related: objc:make string->objc objc->string 


(define nsstring (objc:call "NSString" "stringWithString:" "Hello World"))

(objc:call nsarray "addObject:" nsstring)

Back to index