[Ironruby-core] Problem calling CLR method

Alex 2k8 lists at ruby-forum.com
Wed Jan 7 20:24:56 EST 2009


Hello,

I can't call the object's method, thought it exists.

My ruby script:

- - - - -
# Let's dump .Net methods
far.get_type.get_methods.each { |m| p m.name }

# Try to call 'RegisterTool' method
begin
  far.register_tool
rescue => err
  p err
end

begin
  far.RegisterTool
rescue => err
  p err
end
- - - - -

I get such output:

- - - - -
 ...
"RegisterFiler"
"RegisterTool"
 ...

#<NoMethodError: undefined method `register_tool' for
#<FarNet::Far:0x000005c>>
#<NoMethodError: undefined method `RegisterTool' for
#<FarNet::Far:0x000005c>>
- - - - -

Not sure if this matters, but 'far' variable is set by the script host
  scope.SetVariable("far", Far);

Thanks,
  - Alex
-- 
Posted via http://www.ruby-forum.com/.


More information about the Ironruby-core mailing list