[Pyobjc-dev] Re: Making List<->Array bridging transparent
Brought to you by:
ronaldoussoren
From: Peter M. <zig...@po...> - 2002-11-09 10:31:45
|
Bill Bumgarner wrote: > ... is true, then we add <type 'list'> to the bases for the newly > created Python class object? Assuming a complete implementation of > convenience methods, this would allow bridged instances of NSArray to > function fully on the Python side of the bridge [i.e. work in contexts > like the above where the runtime is testing for a particular type and > not just a set of methods]. > > As an experiment, I tried-- naively-- to add this to the function that > bridges classes to Python... it doesn't work. So you can't do it by adding list as a base but could you instead just not use ObjCObject to do the wrapping? What if you created another class with list as the only base? You can't slam PyListObject and ObjCObject together but could you subclass list and add real_object as another variable? Or will python not even let you subclass compiled classes in C? Peter |