[IronPython] Choosing the right overload
J. Merrill
jvm_cop at spamcop.net
Sat Jun 17 18:52:32 CEST 2006
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 and work out how to catch the exact one you want:
for each (typ, meth) in Direct3D.Mesh.FromFile.__overloads__.items()
print typ
print meth
(Or "print typ, meth" of course, but these are probably long descriptions....) Good luck!
At 01:21 PM 6/16/2006, Jonathan Jacobs wrote
>This is the overload I want:
>
>'static (Mesh, array_ExtendedMaterial) FromFile(str filename, MeshFlags
>options, Device device)': <built-in function FromFile>
>
>The function's C# signature is:
>
>public static Mesh FromFile(string, MeshFlags, Device, out ExtendedMaterial);
>
>So I tried:
>
>>>> Direct3D.Mesh.FromFile.__overloads__[(str, Direct3D.MeshFlags,
>Direct3D.Device, clr.GetClrType(Direct3D.ExtendedMaterial).MakeArrayType())]
>Traceback (most recent call last):
> File , line 0, in <stdin>##22
> File , line 0, in get_Item##18
>TypeError: No match found for the method signature (<type 'str'>, <type
>'MeshFlags'>, <type 'Device'>, Microsoft.DirectX.Direct3D.ExtendedMaterial[])
J. Merrill / Analytical Software Corp
More information about the Ironpython-users
mailing list