I fixed this on Friday
The problem was that Show() declared on Control was hidden by
Show(IWin32Window) on Form. It took me a while to make it work :). See
http://rubyforge.org/pipermail/ironruby-core/2009-February/003752.html
Tomas
From: [email protected]
[mailto:[email protected]] On Behalf Of Meinrad
Recheis
Sent: Sunday, February 08, 2009 3:26 PM
To: [email protected]
Subject: Re: [Ironruby-core] cannot initialize Form with IronRuby
On yesterdays checkout from git message “syncing to head of tfs” I get:
IronRuby 1.0.0.0 on .NET 2.0.50727.1433
Copyright (c) Microsoft Corporation. All rights reserved.
require “System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyTo
ken=b77a5c561934e089”
=> true
System::Windows::Forms::Form.new
=> #System::Windows::Forms::Form:0x000005c
f=System::Windows::Forms::Form.new
=> #System::Windows::Forms::Form:0x000005e
f.Show
:0: wrong number of arguments (2 for 3) (ArgumentError)
f.show
:0: wrong number of arguments (2 for 3) (ArgumentError)
f.show_dialog
=> #System::Windows::Forms::DialogResult:0x0000060
f.method(:Show).clr_members.each { |m| puts m.to_string }
Void Show(System.Windows.Forms.IWin32Window)
=> [#System::Reflection::RuntimeMethodInfo:0x0000062]
On recent git head it works like expected.
I will continue testing with the most recent sources. Keep up the great
work!
Cheers,
–henon
On Sun, Feb 8, 2009 at 9:58 PM, Tomas M.
<[email protected]mailto:[email protected]>
wrote:
Works on the bits I have. Could you try following?
f.method(:Show).clr_members.each { |m| puts m.to_string }
It should print
Void Show()
Void Show(System.Windows.Forms.IWin32Window)
Tomas
From:
[email protected]mailto:[email protected]
[mailto:[email protected]mailto:[email protected]]
On Behalf Of Meinrad R.
Sent: Sunday, February 08, 2009 10:55 AM
To: ironruby-core
Subject: [Ironruby-core] cannot initialize Form with IronRuby
IronRuby 1.0.0.0 on .NET 2.0.50727.1433
Copyright (c) Microsoft Corporation. All rights reserved.
require “System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”
=> true
Form = System::Windows::Forms::Form
=> System::Windows::Forms::Form
f=Form.new
=> #System::Windows::Forms::Form:0x000005c
f.Show()
:0: wrong number of arguments (2 for 3) (ArgumentError)
f.method( :Show).arity
=> 0
This is the latest daily DLR build on codeplex from 2009 Feb 1 at
9:36 PM. I read, that with older versions winforms interop has already
been working.
– henon