[omniORB] Re: omniORBpy: Problem with enumerations
Sebastian Rittau
srittau at jroger.in-berlin.de
Mon Jan 5 13:38:00 GMT 2004
On Mon, Jan 05, 2004 at 01:29:42PM +0100, srittau wrote:
> I've got a strange problem with omniORBpy (version 2.3, omniORB version
> 4.0.3):
*Of course* I forgot the attachements.
- Sebastian
-------------- next part --------------
#!/usr/bin/python
import sys
import threading
from enumobjimpl import EnumObjImpl
import omniORB
from omniORB import CORBA
omniORB.importIDL("foo.idl")
import Foo, Foo__POA
if __name__ == "__main__":
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
poa = orb.resolve_initial_references("RootPOA")
impl = EnumObjImpl()
objref = impl._this()
print orb.object_to_string(objref)
poa_manager = poa._get_the_POAManager()
poa_manager.activate()
orb.run()
-------------- next part --------------
import omniORB
omniORB.importIDL("foo.idl")
import Foo, Foo__POA
class EnumObjImpl(Foo__POA.EnumObj):
def _get_en(self):
print "in _get_en()"
return Foo.ENUM_1
-------------- next part --------------
#!/usr/bin/python
import sys
import omniORB
from omniORB import CORBA
omniORB.importIDL("foo.idl")
import Foo
if __name__ == "__main__":
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
o = orb.string_to_object(sys.argv[1])
eo = o._narrow(Foo.EnumObj)
print eo._get_en()
-------------- next part --------------
#!/usr/bin/python
import sys
import threading
import omniORB
from omniORB import CORBA
omniORB.importIDL("foo.idl")
import Foo, Foo__POA
class EnumObjImpl(Foo__POA.EnumObj):
def _get_en(self):
print "in _get_en()"
return Foo.ENUM_1
if __name__ == "__main__":
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
poa = orb.resolve_initial_references("RootPOA")
impl = EnumObjImpl()
objref = impl._this()
print orb.object_to_string(objref)
poa_manager = poa._get_the_POAManager()
poa_manager.activate()
orb.run()
More information about the omniORB-list
mailing list