[IronPython] howto access interface method?

Dino Viehland dinov at exchange.microsoft.com
Thu Feb 16 17:55:49 CET 2006


The issue here is that the interface's methods are marked private, but are exposed publicly via the interface (aka explicit interface implementation) -hence the reason you need the cast in C#.

This is a shortcoming we're aware of but we don't have a bug on it.  I'll go ahead and file a bug on this so it doesn't get lost.  The fix may be a little complex for this one so it may not make it for beta 4 but I'll initially open it as a beta 4 bug so we'll give it a shot.


-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Chee Meng
Sent: Thursday, February 16, 2006 12:58 AM
To: users at lists.ironpython.com
Subject: [IronPython] howto access interface method?


hi,

I am using the DataGridView object which implements the interface ISupportInitialize,
and that have 2 methods BeginInit and EndInit .

However, through Ironpython,
the 2 methods cannot be found.

is there a way to access the 2 methods in python?

#((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.dataGridView1.BeginInit()

above code gives this error, AttributeError: 'DataGridView' object has no attribute 'BeginInit'


thks


regards
cheemeng




_______________________________________________
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