[omniORB] omniORBpy

Duncan Grisby dpg1@uk.research.att.com
Wed, 01 Mar 2000 16:11:49 +0000


On Wednesday 1 March, Stefan Seefeld wrote:

> interface Kit
> {
>   struct Property{/*...*/};
>   typedef sequence<Property> PropertySeq;
> };

> properties = Warsaw.Kit.PropertySeq();
> 
> which results in the message that I can't instantiate a 
> 'Kit'... ('Warsaw' is the module I compile all global interface
> into)

The message you get is actually that you can't instantiate a
PropertySeq. It's quite correct -- you can't. IDL sequences map to
Python lists (or tuples), so to create a two item sequence, you should
do:

properties = [Warsaw.Kit.Property(...), Warsaw.Kit.Property(...)]

giving the correct constructor for the things declared in Property.

HTH,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --