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

Class ObjCMethod

object --+    
         |    
  ObjCBase --+
             |
            ObjCMethod
Known Subclasses:

Python class representing an unbound ObjC class- or instance-method (actually an IMP_t).

Instance Methods
 
__init__(self, method)
New ObjC method, initialized with an ObjC method pointer.
 
__call__(self, objc_id, *args)
Call the method with the given id and arguments.
 
__str__(self)
str(x)

Inherited from ObjCBase: __repr__

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

Class Variables
  argtypes = []
  encoding = ''
  restype = None
hash(x)
Properties
  callable
Get a Python-callable for this method's IMP_t.
  c_func_t
Get a ctypes prototype for this method (CFUNCTYPE).
  name
Get the method/SELector/cmd name (str).

Inherited from object: __class__

Method Details

__init__(self, method)
(Constructor)

 

New ObjC method, initialized with an ObjC 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 is provided automatically.

__str__(self)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)

Property Details

callable

Get a Python-callable for this method's IMP_t.

Get Method:
callable(self) - Get a Python-callable for this method's IMP_t.

c_func_t

Get a ctypes prototype for this method (CFUNCTYPE).

Get Method:
c_func_t(self) - Get a ctypes prototype for this method (CFUNCTYPE).

name

Get the method/SELector/cmd name (str).

Get Method:
name(self) - Get the method/SELector/cmd name (str).