[IronPython] the new version cannot find an overload for ToolStripItemCollection.AddRange when using a list

Jonathan Jacobs korpse-ironpython at kaydash.za.net
Tue Jun 20 00:05:37 PDT 2006


Cheemeng wrote:
> the doc for ToolStripItemCollection.AddRange list the 2 overloads as:
> ToolStripItemCollection.AddRange (ToolStripItem[])
> ToolStripItemCollection.AddRange (ToolStripItemCollection) 
> 
> in prev ironpython version, we can pass a python list as argument,
> in the newest version, this gives TypeError: no applicable overload
> 
>         ctxMenu.Items.AddRange([ms])    # doesn't work in new version

Oddly enough, the list syntax doesn't work but using a tuple does:

 >>> ctxMenu.Items.AddRange((ms,))
 >>>

-- 
Jonathan



More information about the users mailing list