[IronPython] Working Beta7 WinForms Code fails under RC1

Kevin Bjorke KBjorke at nvidia.com
Thu Jul 27 08:20:38 CEST 2006


That was correct! Sadly now I'm getting an error when I trry to access a
Windwos Forms Panel DefaultFont property.

The line 
	g.DrawString(self.block.name,self.DefaultFont, bb, Point(4, 2))

(g is a Graphics object -- this DID work under Beta 7!)  

Results in the error

	get_DefaultFont() takes exactly -1 arguments (-1 given)

?

-----Original Message-----
From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Martin Maly
Sent: Wednesday, July 26, 2006 11:06 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Working Beta7 WinForms Code fails under RC1

I wonder if the exception string is off a little. What it probably
should say is "expecting array, got list". We no longer have automatic
conversion from list to array. We have one from tuple to array, but not
from list.

You can construct the array explicitly:

System.Array[element_type](anything_enumerable)

Does this work?

Martin

-----Original Message-----
From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Kevin Bjorke
Sent: Wednesday, July 26, 2006 10:55 PM
To: Discussion of IronPython
Subject: [IronPython] Working Beta7 WinForms Code fails under RC1

I have these two lines which worked well under Beta7:

 cb = Drawing2D.ColorBlend()
 cb.Colors = [c,hilight,c,c]

Now I get an error saying "expecting list got array"

??
------------------------------------------------------------------------
-----------
This email message is for the sole use of the intended recipient(s) and
may contain
confidential information.  Any unauthorized review, use, disclosure or
distribution
is prohibited.  If you are not the intended recipient, please contact
the sender by
reply email and destroy all copies of the original message.
------------------------------------------------------------------------
-----------
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list