[IronPython] IronPython support In Visual Studio 2005 April VSSDK?

Vagmi Mudumbai vagmi.mudumbai at gmail.com
Tue May 30 14:35:06 CEST 2006


May be you should say

for type in types:

instead of

for types in types:

Regards,
Vagmi


On 5/30/06, Lesley & Mitch Barnett <mbarnett at uniserve.com> wrote:
>
>   Hi, using the April 2005 VSSDK, I am able fire up a new Visual Studio
> PythonProject (Experimental Hive) using the Windows Application template.  I
> can drag and drop UI controls from the Toolbox onto the design surface.
> However, I notice the IronPython code being generated for both the designer
> and the form is placed in a single file called Form1.py.  In a C# WinForm
> project, the code is separated into 2 files, Form1.cs and
> From1.Designer.cs.
>
>
>
> Is the plan to have IronPython fully integrated into Visual Studio in the
> same way as a C# project, including drop down list for types and members in
> the code editor?  What about debugger support?
>
>
>
> I ask this as I am trying to build a simple IronPython Windows app and
> while being new to the Python language I am also finding it difficult to
> figure out exactly where I put my code in Form1.py cause the both the
> design code and "regular" code are in one place instead of separated as in a
> C# project.
>
>
>
> Finally, I cannot get some simple code to work as it throws an exception,
> "A first chance exception of type
> IronPython.Runtime.ArgumentTypeException' occurred in IronPython.dll.
> When I set the breakpoint to step through the code I get into disassembly
> and I am not good at reading IL.  Then the program aborts with the error
> above.
>
>
>
> My project is real simple, has a Windows form and a listBox control.  All
> I am doing is using System.Reflection to GetTypes from a DLL and put them
> in a listBox.
>
>
>
> In C# it looks like:
>
>
>
> private void GetMyTypes()
>
>         {
>
>             Assembly myAssembly = System.Reflection.Assembly.LoadFrom("
> mapack.dll");
>
>             Type[] types = myAssembly.GetTypes();
>
>             foreach (Type type in types)
>
>             {
>
>                 listBox1.Items.Add(type);
>
>             }
>
>         }
>
>
>
> In IronPython:
>
>
>
>
>
>  def GetMyTypes():
>
>      myAssembly = System.Reflection.Assembly.LoadFrom("mapack.dll")
>
>      types = myAssembly.GetTypes()
>
>      for types in types:
>
>        _listBox1.Items.Add(types)
>
>
>
> In both cases, the method is being called right after
> InitializeComponent()
>
>
>
> Any ideas as to why this IronPython code won't run?
>
>
>
> Thanks in advance,
>
>
>
> Mitch
>
> http://softwareindustrialization.com
>
>
>
>
>
>
>
>
>
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
>


-- 
http://geekswithblogs.net/vagmi.mudumbai
http://installneo.blogspot.com

"Peace is its own reward." - Mahatma Gandhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060530/fa58be79/attachment.html>


More information about the Ironpython-users mailing list