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

Class ObjCDelegate

          object --+            
                   |            
internals._Objectype --+        
                       |        
               _ObjCBase --+    
                           |    
                   ObjCClass --+
                               |
                              ObjCDelegate

Register the _NS_Delegate._ObjC (sub)class and create an ObjCClass(_NS_Delegate.__name__).


Note: ObjCDelegate instances are singletons, intentionally.

Instance Methods

Inherited from ObjCClass: __getattr__, __str__, add_protocol, get_classmethod, get_method

Inherited from _ObjCBase: __repr__

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

Static Methods
a new object with type S, a subtype of T
__new__(cls, _NS_Delegate, *protocols)
New ObjCDelegate for class _NS_Delegate.
Properties

Inherited from ObjCClass: NS, Type, name, ptr

Inherited from _ObjCBase: description

Inherited from internals._Objectype: typename

Inherited from object: __class__

Method Details

__new__(cls, _NS_Delegate, *protocols)
Static Method

 

New ObjCDelegate for class _NS_Delegate.

Parameters:
  • _NS_Delegate - A private Python class intended as an ObjCDelegate with class attribute ._ObjC, an un-registered ObjCSubclass.
  • protocols - None, one or more protocol to add (strs or Protocol_t instances).
Returns: a new object with type S, a subtype of T
Raises:
  • TypeError - Attribute _NS_Delegate._ObjC is not a sub-class of ObjCSubclass or the name of _NS_Delegate does not start with private _NS or end with Delegate.
Overrides: object.__new__