[Ironruby-core] AddRange problem

Michael Letterle michael.letterle at gmail.com
Fri Feb 8 08:47:48 EST 2008


For some reason it seems to be passing it in as

self.listBox1.Items.AddRange('a', 'b', 'c')

Odd..

Regardless though, as a work around for now you can do this:

['a','b','c'].each {|item| self.listBox1.Items.Add item}

On Feb 8, 2008 5:14 AM, Dermot Hogan <lists at ruby-forum.com> wrote:
> I'm having trouble with this in a ListBox control:
>
> self.listBox1.Items.AddRange(['a', 'b', 'c'])
>
> I get the error
>
> :0:in `InitializeComponent': wrong number or type of arguments for
> `AddRange' (ArgumentError)
>
> What's the correct syntax here?
>
> (I think this used to work)
>
> Dermot
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>



-- 
Michael Letterle
[Polymath Programmer]
http://michaeldotnet.blogspot.com


More information about the Ironruby-core mailing list