Never mind, it seems that there's been work done in this area
At 12:28 PM 6/17/2006, J. Merrill wrote (in part)
>If that's the case, then it's possible that the design of __overloads__ needs
>to be changed -- the current key defn of "tuple of types without indication of
>out-or-ref" may not
I'm glad this works, and sorry that I hadn't read the mail where you said you'd
figured it out.
At 12:52 PM 6/17/2006, J. Merrill wrote
>Try adding .MakeByRefType() to what you have:
>
Direct3D.Mesh.FromFile.__overloads__[(str, Direct3D.MeshFlags,
Direct3D.Device,
clr.GetClrType(
Try adding .MakeByRefType() to what you have:
>>> Direct3D.Mesh.FromFile.__overloads__[(str, Direct3D.MeshFlags,
>>> Direct3D.Device,
>>> clr.GetClrType(Direct3D.ExtendedMaterial).MakeArrayType().MakeByRefType())]
Another possibility would be to display the elements of __overloads__
explicitly
At 01:21 PM 6/16/2006, Jonathan Jacobs wrote (in part)
>J. Merrill wrote: (in part)
>> I don't know if C# allows overloads that are identical except for out-ness
>> -- can you have both
>>int Foo(string x, out int blah)
>>and int Foo(string x, int blah) ???
>
>Apparently you can.
If tha
you won't have to deal with the
insanity for too long.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Jacobs
Sent: Friday, June 16, 2006 10:33 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Choosing the right overload
Jonathan J
Jonathan Jacobs wrote:
> I did some digging in the source code, it looks like the problem is the
> indexer for BuiltinFunctionOverloadMapper. The problem appears to be: from
> Python I am unable to specify whether an argument is byref or not and so the
> comparison fails when trying to match sig
Jonathan Jacobs wrote:
Direct3D.Mesh.FromFile.__overloads__[(str, Direct3D.MeshFlags,
> Direct3D.Device, clr.GetClrType(Direct3D.ExtendedMaterial).MakeArrayType())]
> Traceback (most recent call last):
>File , line 0, in ##22
>File , line 0, in get_Item##18
> TypeError: No match found
J. Merrill wrote:
> If you know where the "out" parameter goes in the parameter list (e.g. at
> the end) you could specify a tuple that includes it in the right spot.
> Martin has shown you how to define the array.
I didn't know about the array type trick but I'm still having some trouble.
This is
At 06:25 AM 6/16/2006, Jonathan Jacobs wrote (in part)
>Hi,
>
>I'm wondering how to call a specific overload, more specifically one that in
>C# would take an out parameter but in IronPython does/can not.
>
>Here are the available overloads:
>
> >>> print Direct3D.Mesh.FromFile.__doc__
>[snip]
>sta
The array_EffectInstance is EffectInstance[] and to get that type, you can do:
clr.GetClrType(Direct3D.X.EffectInstance).MakeArrayType()
For example:
>>> clr.GetClrType(System.Collections.Hashtable).MakeArrayType()
System.Collections.Hashtable[]
Hope this helps.
Martin
-Original Messag
10 matches
Mail list logo