[omniORB] OmniORBpy and new style classes

Paul Webb pw@bernafon.com.au
Thu, 14 Mar 2002 11:13:42 +1000 (EST)


> On Thursday 7 March, "Paul Webb" wrote:
>
>> If, for example, I change line 10 in the
>> example/echo/example_echo_srv.py so that the Echo_i class is also
>> derived from 'object' (so that it becomes a new-style class):
>>
>> 10 class Echo_i (Example__POA.Echo, object):
> [...]
>> omniORB.CORBA.BAD_PARAM: Minor: BAD_PARAM_WrongPythonType,
>> COMPLETED_NO.
>
> OK, but why would you want to do that?  I think it would probably be
> possible to make it work, but it would probably involve touching quite
> a lot of code. I don't have time to do that at the moment.

The example given is obviously contrived and doesn't really do anything
useful except demonstrate the problem.

What I was actually trying to do, was to use python's metaclass facility to
dynamically examine a class, generate suitable IDL, compile it and return a
new class that correctly subclasses the omniidl generated classes.

I understand you have plenty of other things to do, thanks for taking the
time to respond to my questions.  I will keep an eye on the changelogs in
case you get around to it at some stage.


Regards,

Paul