|
|
|
|||||
|
IceRuby: Ice::ObjectPrx arguments bug?
I have a server with a definition like this:
Code:
interface IndicatorBase {
void setForwardingProxy(Object* proxy);
};
Code:
>> t1.setForwardingProxy( $ic.stringToProxy("Foo") )
NameError: uninitialized constant Ice::ObjectPrx::ICE_TYPE
from (eval):657:in `invoke'
from (eval):657:in `setForwardingProxy'
from (irb):12
Note that it works fine if I pass a derived type: Code:
>> t1.setForwardingProxy( $cs ) => nil >> $cs.class => Gina::DerivedClassPrx Thanks!
__________________
Caleb Tennis Analytical Engineering, Inc. http://www.aei-tech.com Project: Our facility infrastructure heavily utilizes Ice Gentoo ebuild maintainer for Ice, IceRuby, etc. Last edited by ctennis : 08-24-2007 at 05:33 PM. |
|
|||||
|
Thanks for the response, Matthew. This is on Linux, and Ice and IceRuby are basically self compiled.
I did what you did, adding the foo method to the hello demo, and started the server (after adding the necessary implementation methods for foo(), of course). When I add those lines to the Client.rb client and run it, I get: Code:
foo -t:tcp -h 127.0.0.1 -p 10000 foo -t:tcp -h 127.0.0.1 -p 10000 #<NameError: uninitialized constant Ice::ObjectPrx::ICE_TYPE> (eval):61:in `invoke' (eval):61:in `foo' Client.rb:64:in `run' /usr/lib/ruby/site_ruby/1.8/Ice.rb:234:in `main' Client.rb:168 Code:
module Demo
{
interface Hello
{
void foo(Object* prx);
["cpp:const"] idempotent void sayHello(int delay);
void shutdown();
};
};
Code:
o = Ice::Application::communicator().stringToProxy("foo:tcp -p 10000")
puts o
twoway.foo(o)
Thanks, Caleb
__________________
Caleb Tennis Analytical Engineering, Inc. http://www.aei-tech.com Project: Our facility infrastructure heavily utilizes Ice Gentoo ebuild maintainer for Ice, IceRuby, etc. |
|
||||||
|
I've verified this bug. Please apply the following patch to ruby/Ice.rb in the distribution. That should sort out your problem.
Code:
index 9ee3d44..d904eca 100644
--- a/rb/ruby/Ice.rb
+++ b/rb/ruby/Ice.rb
@@ -43,7 +43,10 @@ module Ice
end
T_Object.defineClass(nil, true, nil, [], [])
+ Object_mixin::ICE_TYPE = T_Object
+
T_ObjectPrx.defineProxy(ObjectPrx, T_Object)
+ ObjectPrx::ICE_TYPE = T_ObjectPrx
#
# LocalObject.
|
|
|||||
|
Thanks, Matthew. I can confirm this does indeed fix the issue.
Caleb
__________________
Caleb Tennis Analytical Engineering, Inc. http://www.aei-tech.com Project: Our facility infrastructure heavily utilizes Ice Gentoo ebuild maintainer for Ice, IceRuby, etc. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| IceRuby bug with propertyToProxy | ctennis | Bug Reports | 2 | 03-21-2007 03:50 PM |
| using Ice::ObjectPrx as a slice datatype | gumshoe | Help Center | 1 | 01-29-2007 06:35 PM |
| Possible IceRuby bug? | jesse@mind.net | Bug Reports | 2 | 01-04-2007 05:55 PM |
| generated C# classes don't have constructors with arguments for fields | kovacm | Bug Reports | 1 | 08-07-2005 08:00 PM |
| Adding ProxyToString to ObjectPrx | DeepDiver | Comments | 6 | 07-21-2005 04:50 AM |