Re: [Python.NET] Accessing class interface with private methods

2007-12-14 Thread lance23runner
Cool. Thanks Brian, this worked! -Alex Brian Lloyd-5 wrote: > > have you tried explicitly calling this through the interface? You > need to do something similar to a cast in C#: > > from mynamespace import Foo, Iface > > inst = Foo() # create an instance > > wrapped = Iface(inst) # 'cas

Re: [Python.NET] Accessing class interface with private methods

2007-12-12 Thread Brian Lloyd
have you tried explicitly calling this through the interface? You need to do something similar to a cast in C#: from mynamespace import Foo, Iface inst = Foo() # create an instance wrapped = Iface(inst) # 'cast' to the interface wrapped.Func() # should now work hope this helps, -Brian On

Re: [Python.NET] Accessing class interface with private methods

2007-12-12 Thread lance23runner
I forgot to add "Implements Iface.Func" to method Func, I hope this doesn't confuse my problem. It is added below. The private method Func is accessible in VB.NET using the public IFACE. This is intended so the class does not see these methods, but it can access them using the IFACE property.

Re: [Python.NET] Accessing class interface with private methods

2007-12-11 Thread Brian Lloyd
. > > Kind regards, Tijs > > > > Feihong Hsu hsu.feihong at yahoo.com > Sun Dec 9 15:54:23 CET 2007 > > Previous message: [Python.NET] Accessing class interface with private methods > Next message: [Python.NET] Struct

Re: [Python.NET] Accessing class interface with private methods

2007-12-11 Thread Tijs Wickardt
those public methods from Python for .NET. Cumbersome, but should work. Kind regards, Tijs Feihong Hsu hsu.feihong at yahoo.com Sun Dec 9 15:54:23 CET 2007 Previous message: [Python.NET] Accessing class interface with private methods Next message: [Python.NET] Structure as argument Messages sort

Re: [Python.NET] Accessing class interface with private methods

2007-12-09 Thread Feihong Hsu
This is not supported. You can't access private methods in C# or VB.NET either, so why should Python.NET be able to access them? But one thing to note is that you CAN access protected methods directly in Pyhon.NET (you don't have to make a subclass to use a protected method). - Feihong alex om

[Python.NET] Accessing class interface with private methods

2007-12-08 Thread alex omoto
Hi, I am having trouble using Python.NET in accessing class interface methods that are declared private. As an example, Public Interface Iface Property Func() As Boolean End Interface Public Class Foo Implements Iface Private Function Func() As Boolean Return True End