[omniORB] Unions in omniORBpy

Kevin Bailey ke-omniorb@retriever.dyndns.org
Tue, 29 May 2001 11:01:09 -0700


Given the following union in IDL:

module Food
{

union Onion switch(boolean)
{
  case TRUE:
    long layer;
};

};

what is the proper way to create an Onion with the discriminator
set to false ?

I've tried:

  grilled = Food.Onion(_d=0)

and

  grilled = Food.Onion(_d=None)

and

  grilled = Food.Onion(_d=Food.Onion._def_d)

but all generate a CORBA.BAD_PARAM exception when marshalled
(at least nothing seems to show up on the server side with
-ORBtraceLevel 20).

I'm using omniORBpy 1.3.

Thanks