[Ironruby-core] trouble with super and .NET classes

Eric Nicholson enicholson at gmail.com
Wed Oct 17 13:52:07 EDT 2007


Is this going to be included in SVN anytime soon?

-Eric

On 10/8/07, John Messerly <jomes at microsoft.com> wrote:
>
> I attached a patch that fixes inheriting from a CLR base class. Of course,
> there's still a lot more work to do, but it lets you do the basic things
> like inherit from a CLR type and add methods in Ruby.
>
> - John M
>
> -----Original Message-----
> From: ironruby-core-bounces at rubyforge.org [mailto:
> ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (DLR)
> Sent: Monday, October 08, 2007 3:08 PM
> To: ironruby-core at rubyforge.org
> Subject: Re: [Ironruby-core] trouble with super and .NET classes
>
> A quick look at the code:
>
> Enums are broken today, so that won't work without some helper library
> that just returns the enum value. This is on our short list of bugs to fix
> already.
>
> Jomes has already fixed inheritance and will be posting a patch for that
> soon to unblock you (we're still going to code review it internally and run
> it through our testing infrastructure before it gets out).
>
> Thanks,
> -John
>
>
> > -----Original Message-----
> > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-
> > bounces at rubyforge.org] On Behalf Of Dermot Hogan
> > Sent: Monday, October 08, 2007 2:56 PM
> > To: ironruby-core at rubyforge.org
> > Subject: Re: [Ironruby-core] trouble with super and .NET classes
> >
> > Hi John,
> >
> > Here's some very simple text: a form, a checkbox and a button with a
> > couple of attributes. I haven't been able run this in IR at all so I've
> > no idea if it will work or not. However, it looks like the sort of
> > thing
> > that the Form Designer produces in C# or VB. Tt does 'round trip'
> > between the designer and persistant store, so it's internally
> > consistent
> > - I think :)
> >
> > require 'mscorlib'
> > require 'System'
> > require 'System.Windows.Forms'
> > require 'System.Drawing'
> >
> > class Form1123 < System::Windows::Forms::Form
> >
> >   attr_accessor :checkBox1
> >   attr_accessor :button2
> >
> >   def InitializeComponent
> >
> >     self.button2 = System::Windows::Forms::Button.new()
> >     self.checkBox1 = System::Windows::Forms::CheckBox.new()
> >     self.SuspendLayout()
> >     #
> >     # button2
> >     #
> >     self.button2.Location = System::Drawing::Point.new(79, 113)
> >     self.button2.Name = "button2"
> >     self.button2.Size = System::Drawing::Size.new(75, 23)
> >     self.button2.TabIndex = 0
> >     self.button2.Text = "button2"
> >     self.button2.TextAlign =
> > System::Drawing::ContentAlignment.TopCenter
> >     self.button2.UseVisualStyleBackColor = true
> >     #
> >     # checkBox1
> >     #
> >     self.checkBox1.Anchor = System::Windows::Forms::AnchorStyles.Top  |
> > System::Windows::Forms::AnchorStyles.Bottom  |
> > System::Windows::Forms::AnchorStyles.Left
> >     self.checkBox1.AutoSize = true
> >     self.checkBox1.Location = System::Drawing::Point.new(79, 61)
> >     self.checkBox1.Name = "checkBox1"
> >     self.checkBox1.Size = System::Drawing::Size.new(90, 17)
> >     self.checkBox1.TabIndex = 1
> >     self.checkBox1.Text = "checkBox1"
> >     self.checkBox1.TextAlign =
> > System::Drawing::ContentAlignment.TopLeft
> >     self.checkBox1.UseVisualStyleBackColor = true
> >     #
> >     # Form1123
> >     #
> >     self.ClientSize = System::Drawing::Size.new(284, 264)
> >     self.Controls.Add(self.checkBox1)
> >     self.Controls.Add(self.button2)
> >     self.Name = "Form1123"
> >     self.ResumeLayout(false)
> >     self.PerformLayout()
> >   end
> > end
> >
> >
> > good luck!
> >
> > Dermot
> > --
> > Posted via http://www.ruby-forum.com/.
> > _______________________________________________
> > Ironruby-core mailing list
> > Ironruby-core at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/ironruby-core
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071017/5e5f6828/attachment.html 


More information about the Ironruby-core mailing list