I am attempting to call an interface method for a .net class and am having difficulty. I'm using IronRuby v1.1.2 and working with ScintillaNet, a .net wrapper for the Scintilla control.
A portion of the ScintillaNet::Scintilla class is below: namespace ScintillaNet { ... public partial class Scintilla : Control, INativeScintilla, ISupportInitialize { ... } } And a portion of the ScintillaNet::INativeScintilla interface is below: namespace ScintillaNet { public interface INativeScintilla { ... void BackTab(); ... } } I came across another forum discussion http://rubyforge.org/pipermail/ironruby-core/2009-January/003520.html, which seems to fall along the lines of what I'm trying to do, but I'm not sure the features discussed there are implemented yet. I've reduced the troublesome code to a relatively short length to play with alternative approaches: require "bin/ScintillaNet" class ScintillaNet::Scintilla include ScintillaNet::INativeScintilla def self.ztest2() z = ScintillaNet::Scintilla.new() puts "z[#{z}]" #; z.BackTab() # undefined method `BackTab' for ScintillaNet.Scintilla:ScintillaNet::Scintilla (NoMethodError) #; ScintillaNet::INativeScintilla(z).BackTab() # undefined method `INativeScintilla' for ScintillaNet:Module (NoMethodError) #; ScintillaNet::INativeScintilla.BackTab() # undefined method `BackTab' for ScintillaNet::INativeScintilla:Module (NoMethodError) puts "fence" end end ScintillaNet::Scintilla.ztest2() puts "done" The three approaches above yield the errors to the right of each line. Thanks in advance for any assistance you might be able to provide. --John -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core