[IronPython] the new version cannot find an overload for ToolStripItemCollection.AddRange when using a list
Dino Viehland
dinov at exchange.microsoft.com
Tue Jun 20 08:29:51 PDT 2006
Yep, this is part of our tightening down our conversion & method dispatch logic. We thought the implicit conversion from a List to an array was a little evil. The array could be updated inside of the call and the user's list wouldn't be updated. A caller w/ a tuple doesn't expect to see their tuple updated, and therefore that is an acceptable conversion.
-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jonathan Jacobs
Sent: Tuesday, June 20, 2006 12:06 AM
To: Discussion of IronPython
Subject: Re: [IronPython] the new version cannot find an overload for ToolStripItemCollection.AddRange when using a list
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
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
More information about the users
mailing list