Adding ProxyToString to ObjectPrx

DeepDiverDeepDiver Thomas MuellerOrganization: Freelance Software DeveloperProject: Project depend on CustomersMember ✭✭✭
hi,

in some cases it would make live a little bit easier if the operation
proxyToString would be part of the proxy object.

currently we need to pass the proxy and the communicator instances to
the class were we want to call the operation.

or we access the communicator via:
p.ice_connection().getAdapter().getCommunicator().proxyToString( p )

but this is bit messy and only works on server side.

let me know if there is any other way to achive this.

thx tom

Comments

  • michimichi Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-)Member ✭✭✭
    If this is happening as part of an operation implementation, you can get at the communicator via the Ice::Current parameter:
    current->adapter->getCommunicator
    

    Would that fix your problem?

    Cheers,

    Michi.
  • DeepDiverDeepDiver Thomas MuellerOrganization: Freelance Software DeveloperProject: Project depend on CustomersMember ✭✭✭
    hi michi,

    thanks for your reply!

    as always my writings contain too little information - sorry.

    i was talking about the client side.

    thx tom
  • michimichi Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-)Member ✭✭✭
    I'll discuss this with me collegues to see whether there is something we can improve.

    Cheers,

    Michi.
  • mariomario Member
    Hi, just a little note about this:

    In Python, I found very useful for debugging purposes write something like:

    proxy = self.communicator().stringToProxy("mec:...")
    print proxy

    For sure, it would be very well have something like that in C++ :)

    Regards
    Mario
  • michimichi Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-)Member ✭✭✭
    The next major release of Ice will provide an ice_toString() method on proxies. That way, you can stringify a proxy without having to have a communicator.

    Cheers,

    Michi.
  • DeepDiverDeepDiver Thomas MuellerOrganization: Freelance Software DeveloperProject: Project depend on CustomersMember ✭✭✭
    hi michi,

    thats really cool!

    thanks alot!

    cu tom
Sign In or Register to comment.