Re: [Pyobjc-dev] Protocol support
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2005-03-01 21:09:53
|
On 18-feb-05, at 6:12, Bob Ippolito wrote: >>> >>> >>> It could use (at least) the following improvements: >>> - Protocols are not type checked. Anything in the base list that is >>> a PyObjCObject will get chunked into the protocol list. Will >>> probably crash if you do something really stupid (though there's >>> plenty of that in PyObjC anyway) >> Protocols are now typechecked. >> >> I've also added some unittests for this feature. >> >>> - Protocols can not be created from PyObjC >>> - selectors don't benefit from the Protocol information like they do >>> for informal protocols >>> - PyObjC doesn't verify that you implement the protocol like it does >>> for informal protocols >>> - objc.protocolNamed is probably pretty slow, should use a lookup >>> hash >> These still need to be implemented. > > I just added an objc.protocolsForClass, and re-implemented > protocolNamed in Python using a lookup hash but with the same search > algorithm. Could be faster if it cached classes it has seen, but I > guess maybe a category could change the behavior of that so this is > safer. > > The other three more important things are still unimplemented :) The other 3 are now also implemented (revision 1524). The code will see some restructuring in the future, but is fully functional. Ronald |