Re: [IronPython] Error Iterating

2010-01-21 Thread David McWright
Message- > From: users-boun...@lists.ironpython.com > [mailto:users-boun...@lists.ironpython.com] On Behalf Of David McWright > Sent: Thursday, January 21, 2010 7:44 PM > To: us...@lists.ironpython.com > Subject: [IronPython] Error Iterating > > Hello All, >    I'm working

Re: [IronPython] Error Iterating

2010-01-21 Thread David DiCato
m Subject: [IronPython] Error Iterating Hello All, I'm working through a book and one of the exercise involves building comboBox filled with the names of the installed FontFamilies. The code and error are: >>> import clr >>> clr.AddReference("System.Drawing&

Re: [IronPython] Error Iterating

2010-01-21 Thread Curt Hagenlocher
You need to instantiate the InstalledFontCollection because "Families" is not a static property. >>> import clr >>> clr.AddReference('System.Drawing') >>> from System.Drawing.Text import InstalledFontCollection >>> for f in InstalledFontCollection().Families: ... print f.Name ... break ...

[IronPython] Error Iterating

2010-01-21 Thread David McWright
Hello All, I'm working through a book and one of the exercise involves building comboBox filled with the names of the installed FontFamilies. The code and error are: >>> import clr >>> clr.AddReference("System.Drawing") >>> from System.Drawing.Text import InstalledFontCollection >>> for f in I