On Tue, Dec 16, 2003 at 06:48:50PM +0000, Gustavo J. A. M. Carneiro wrote:
> I tried before to reply, but somehow the mail got lost.
> http://yang.inescn.pt/~gjc/pyorbit-echo.tgz
Thanks, with this code I was successful. I had to change a
few lines to make the code ORB independent. I didn't try
fnorb, but omniORBpy and pyORBit work well. Maybe you can
use the changes?
1. Instead of 'import ORBit' and 'from ORBit import CORBA'
in both client and server:
import CORBA
try:
if CORBA.ORB_ID == "omniORB4": # don't forget omniidl -bpython echo.idl
pass #print "using omniORB"
except AttributeError: # ORBit's CORBA has no ORB_ID
import ORBit
ORBit.load_file("echo.idl")
#print "using ORBit"
2. Instead of 'servant._default_POA().the_POAManager.\
activate()' in the server:
poa = orb.resolve_initial_references("RootPOA")
# omniORB's poa has no 'the_POAManager'
poaManager = poa._get_the_POAManager()
poaManager.activate()
3. Instead of 'orb.shutdown()' in the server:
# argument to shutdown is mandatory
orb.shutdown(0)
4. Instead of 'echo = orb.string_to_object(ior)' in the
client:
obj = orb.string_to_object(ior)
# Thou shall always narrow!
echo = obj._narrow(Test.Echo)
Cheers,
--
W. Borgert <[EMAIL PROTECTED]>
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/