Re: [Pyobjc-dev] AppKit/__init__.py complexity
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-02-28 17:42:43
|
On Friday, Feb 28, 2003, at 16:51 Europe/Amsterdam, Just van Rossum wrote: > Bill Bumgarner wrote: > >> Nope. Silly me. It only takes 13 milliseconds to define all of the >> informal_protocols on a TiBook 667. > > That's indeed not so bad. What worries me more is that they all seem > hand-rolled. Would it be possible -- in theory at least -- to generate > them from header files? Not without giving up at least some functionality. The informal procols seem to be defined as categories on NSObject for at least some protocols, which should make it possible to generate informal_protocol definitions given a list of protocol names. The current versions of the informal_protocol definitions also list whether methods are optional or not, and that cannot be inferred from the header files. Not having the additional information wouldn't be too bad, I'm sure Cocoa will complain loudly if an object doesn't implement the required parts of a protocol. Ronald |