Still get the same problem :\ although the Action[Avatar] one returns a NoneType instead of complaining about an insane number of arguments.
############# >>> temp.ForEach.Overloads[InternalDictionary[UInt32,Avatar],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) >>> ############# ############# >>> temp.ForEach.Overloads[Action[Avatar]](lambda x: x.FirstName) >>> dir(temp.ForEach.Overloads[Action[Avatar]](lambda x: x.FirstName)) ['Equals', 'GetHashCode', 'GetType', 'MemberwiseClone', 'ReferenceEquals', 'ToSt ring', '__class__', '__delattr__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '_ _setattr__', '__sizeof__', '__str__', '__subclasshook__'] >>> type(temp.ForEach.Overloads[Action[Avatar]](lambda x: x.FirstName)) <type 'NoneType'> >>> ############# On May 23, 12:56 pm, Dino Viehland <di...@microsoft.com> wrote: > I think your .Overloads needs to be: > > .Overloads[Action[Avatar]] > > Or maybe: > > .Overloads[InternalDictionary[UInt32, Avatar], Avatar] > > > > > > > > > > > -----Original Message----- > > From: users-boun...@lists.ironpython.com [mailto:users- > > boun...@lists.ironpython.com] On Behalf Of Intertricity > > Sent: Monday, May 23, 2011 12:53 AM > > To: us...@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 > > us...@lists.ironpython.com > >http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > Users mailing list > Us...@lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com