[IronPython] cannot access protected member without a python subclass
Bernat Ràfales Mulet
brafales at tango04.net
Wed Jan 21 14:24:36 CET 2009
Hello,
I'm trying to add scripting to an existing application in C#. My
approach is to provide some Wrapper classes, that are instantiated and
then passed to a python engine scope via the SetVariable method of the
scope class. The problem is that one of those wrappers has a public
property with the get and set methods, but when I try to access the
property in the Python Script I get this error:
cannot access protected member ElementID without a python subclass of Serie.
The Serie class is simple:
using System;
using System.Collections.Generic;
using System.Text;
namespace Tango04.DashBoard.Scripting.Wrappers
{
class Serie
{
public string Name { get; set; }
public string ElementID { get; set; }
}
}
The Python code I use is as simple as this:
ShowSerie = Serie.ElementID != 'somestring'
I instantiate a Serie object, fill it with the data, and then pass it as
a variable to the script.
Anyone knows what I'm doing wrong?
Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: brafales.vcf
Type: text/x-vcard
Size: 351 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090121/676f5c31/attachment.vcf>
More information about the Ironpython-users
mailing list