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

Class ObjCMethod

          object --+        
                   |        
internals._Objectype --+    
                       |    
               _ObjCBase --+
                           |
                          ObjCMethod
Known Subclasses:

Python class representing an unbound ObjC instance method, actually an IMP_t.

Instance Methods
 
__init__(self, method)
New ObjC[Class]Method for an ObjC method pointer.
 
__call__(self, inst, objc_id, *args)
Call an ObjC instance or class method with the given arguments.
 
__str__(self)
str(x)

Inherited from _ObjCBase: __repr__

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

Properties
  argtypes
Get this method's argument types (ctypes[]).
  encoding
Get this method's encoding (bytes).
  name
Get this method's Sel/cmd name (str).
  restype
Get this method's result type (ctype).

Inherited from _ObjCBase: description

Inherited from internals._Objectype: typename

Inherited from object: __class__

Method Details

__init__(self, method)
(Constructor)

 

New ObjC[Class]Method for an ObjC method pointer.

Parameters:
  • method - The method pointer (IMP_t).
Overrides: object.__init__

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

 

Call an ObjC instance or class method with the given arguments.

Parameters:
  • inst - The ObjC instance (ObjCInstance), only used for reporting errors.
  • objc_id - The ObjC instance (ObjCInstance) or ObjC class (Class_t).
  • args - Method arguments (all positional).

Note: Do not pass in the Sel/cmd as an argument, since that is provided automatically.

See Also: ObjCBoundMethod.__call__.

__str__(self)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)

Property Details

argtypes

Get this method's argument types (ctypes[]).

Get Method:
argtypes(self) - Get this method's argument types (ctypes[]).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

encoding

Get this method's encoding (bytes).

Get Method:
encoding(self) - Get this method's encoding (bytes).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

name

Get this method's Sel/cmd name (str).

Get Method:
name(self) - Get this method's Sel/cmd name (str).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

restype

Get this method's result type (ctype).

Get Method:
restype(self) - Get this method's result type (ctype).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.