Package pycocoa :: Module runtime :: Class ObjCMethod
[frames] | no frames]

Class ObjCMethod

object --+
         |
        ObjCMethod

This represents an unbound Objective-C method (really an IMP).

Instance Methods
 
__init__(self, method)
Initialize with an Objective-C Method pointer.
 
__call__(self, objc_id, *args)
Call the method with the given id and arguments.
 
__repr__(self)
repr(x)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
  callable
Returns a Python-callable for the method's IMP.
  cfunctype
Returns a ctypes CFUNCTYPE for the method.

Inherited from object: __class__

Method Details

__init__(self, method)
(Constructor)

 

Initialize with an Objective-C Method pointer.

We then determine the return type and argument type information of the method.

Overrides: object.__init__

__call__(self, objc_id, *args)
(Call operator)

 

Call the method with the given id and arguments.

You do not need to pass in the selector as an argument since it will be automatically provided.

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

Property Details

callable

Returns a Python-callable for the method's IMP.

Get Method:
callable(self) - Returns a Python-callable for the method's IMP.

cfunctype

Returns a ctypes CFUNCTYPE for the method.

Get Method:
cfunctype(self) - Returns a ctypes CFUNCTYPE for the method.