Re: [Pyobjc-dev] Key/Value Coding
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-08-14 20:03:59
|
On Thursday, 14 August, 2003, at 21:34, Pierce T. Wetter III wrote: > >> I'm going to roll back Bill's patch, it's not very usefull just >> before a 1.0 release. I'm going to look at the unittest to check if >> they add tests that should be added to the other KVC unittest files. > > Actually, its a trivial change to get "key" to work as well. I sent > changes independently to bill that fix most of the broken unit tests, > except the ones where python is subclassing. In that case, the objects > aren't getting built for some reason, so I'll have to pass on those. It may be trivial to get this to work, but not necessarily correct. In python the accessor methods are named 'get_value' and 'set_value' (or the camelcase variations of those), using accessors named like an attribute would be confusing. BTW. The reason I'll roll back Bill's patch is that it introduces code that doesn't seem to serve a usefull purpose. If you use a mixin to add Objective-C style key-value coding, you may as well use a subclass of NSObject. Furthermore, the code won't work in the first place because the implementation for OC_PythonObject already contains implementations for those methods that don't (and shouldn't) check if the Python object happens to implement these methods as well. Ronald |