[Mono-list] new IronPython changes reveal Mono bug in accessing protected methods?

Doug Blank doug.blank at gmail.com
Mon May 25 09:20:35 EDT 2009


On 5/25/09, Rodrigo Kumpera <kumpera at gmail.com> wrote:
> Please fill a bug report on this.

Ok, will do. It may also be the same as:

https://bugzilla.novell.com/show_bug.cgi?id=506757

but I'm just guessing.

-Doug

>
> On Sun, May 24, 2009 at 4:49 PM, Doug Blank <doug.blank at gmail.com> wrote:
>
>> I'm testing the latest stable build (0.91) of the DLR (Dynamic Language
>> Runtime) from:
>>
>>
>> http://dlr.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=21424#ReleaseFiles
>>
>> with that version of IronPython. Trying this Python code with mono
>> ipy.exe:
>>
>> import clr
>> clr.AddReference("System.Windows.Forms")
>> from System.Windows.Forms import *
>> class MyForm(Form): pass
>> f = MyForm()
>> f.SetStyle(ControlStyles.UserPaint, True)
>>
>> Gives:
>>
>> Traceback (most recent call last):
>> TypeError: cannot access protected member SetStyle without a python
>> subclass of Control
>>
>> This was also releated to an error that Microsoft had earlier that
>> exposed
>> protected methods, and now requires the MyForm wrapper, see:
>>
>> http://dlr.codeplex.com/Thread/View.aspx?ThreadId=57324
>>
>> I'm using:
>>
>> $ mono --version
>> Mono JIT compiler version 134631 (tarball Sat May 23 10:52:56 UTC 2009)
>> Copyright (C) 2002-2008 Novell, Inc and Contributors.
>> www.mono-project.com
>>     TLS:           __thread
>>     GC:            Included Boehm (with typed GC and Parallel Mark)
>>     SIGSEGV:       altstack
>>     Notifications: epoll
>>     Architecture:  x86
>>     Disabled:      none
>>
>> I've also tried the latest version of IronPython independent of the DLR,
>> and both versions of ipy.exe under .NET on Windows work fine, so this
>> looks
>> like a Mono bug, although strange that it worked before MS fixed
>> IronPython
>> so that you had to subclass Form to access the protected SetStyle. That
>> must
>> have uncovered a Mono bug, don't you think?
>>
>> Any feedback appreciated,
>>
>> -Doug
>>
>>
>> _______________________________________________
>> Mono-list maillist  -  Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
>>
>


More information about the Mono-list mailing list