[IronPython] Issue reading an InternalDictionary, Overloads fails with 2147483647 arguments bug.
Dino Viehland
dinov at microsoft.com
Mon May 23 18:56:21 CEST 2011
I think your .Overloads needs to be:
.Overloads[Action[Avatar]]
Or maybe:
.Overloads[InternalDictionary[UInt32, Avatar], Avatar]
> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Intertricity
> Sent: Monday, May 23, 2011 12:53 AM
> To: users at lists.ironpython.com
> Subject: [IronPython] Issue reading an InternalDictionary, Overloads fails
> with 2147483647 arguments bug.
>
> I'm trying to read the keys of an InternalDictionary of a .Net dll I'm loading
> into IronPython. The library is libomv.
>
> I've googled for several hours now, and I can't seem to find a clear way to get
> around this.
> Here's the doc string on the ForEach I'm trying to use, I've referenced temp
> to the object in question to keep things short while I'm at the interpreter.
>
> >>> print temp.ForEach.__doc__
> ForEach(self: InternalDictionary[UInt32, Avatar], action:
> Action[KeyValuePair[UI
> nt32, Avatar]])
> Perform an on each key of an
>
> action: to perform
> ForEach(self: InternalDictionary[UInt32, Avatar], action:
> Action[UInt32])
> Perform an on each key of an
>
> action: to perform
> ForEach(self: InternalDictionary[UInt32, Avatar], action:
> Action[Avatar])
> Perform an on each key of an
>
> action: to perform
>
>
>
> And here's what happens when I try to use the Overloads method to solve
> overloading:
>
> >>> temp.ForEach.Overloads[Avatar](lambda x: x.FirstName)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> TypeError: ForEach() takes at least 2147483647 arguments (1 given)
> >>>
>
> Anyone have a clue how to get this to work? I'm not too familiar with .Net,
> and got into it through IronPython, so I'm not sure what I could be doing
> wrong.
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
More information about the Ironpython-users
mailing list