[IronPython] cast to different interface
Dino Viehland
dinov at exchange.microsoft.com
Fri Aug 4 17:12:45 CEST 2006
You can do:
System.ComponentModel.ISupportInitialize.SomeProperty.GetValue(self)
Or
System.ComponentModel.ISupportInitialize.SomeProperty.SetValue(self, value)
We've exposed these 2 helper methods off of the reflected property for this purpose. Even if we hadn't done that you'd still be able to do:
System.ComponentModel.ISupportInitialize.SomeProperty.__get__(self,type(self))
Or
System.ComponentModel.ISupportInitialize.SomeProperty.__set__(self,value)
But we thought GetValue & SetValue were friendlier.
-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Christoph
Sent: Friday, August 04, 2006 3:07 AM
To: users at lists.ironpython.com
Subject: [IronPython] cast to different interface
Hello,
i'm trying to use serveral interfaces of one object.
The solution mentioned here earlier don't work for porperties:
Problem:
dgv = System.Windows.Forms.DataGridView()
dgv.BeginInit()
Solution:
System.ComponentModel.ISupportInitialize.BeginInit(dgv)
How can i use this solution for properties?
Greetings
Christoph
_______________________________________________
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