That solved the problem, I usually use internal unless its necessary to
make something public, I didn't realize that the IronPython code is
executed from another assembly.
Thanks!
Marty Nelson wrote:
Your class is internal, do you mean "public class Serie"?
-----Original Message-----
From: users-boun...@lists.ironpython.com
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Bernat Ràfales Mulet
Sent: Wednesday, January 21, 2009 5:25 AM
To: users@lists.ironpython.com
Subject: [IronPython] cannot access protected member without a pythonsubclass
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!
=======
Notice: This e-mail message, together with any attachments, contains
information of Symyx Technologies, Inc. or any of its affiliates or
subsidiaries that may be confidential, proprietary, copyrighted,
privileged and/or protected work product, and is meant solely for
the intended recipient. If you are not the intended recipient, and
have received this message in error, please contact the sender
immediately, permanently delete the original and any copies of this
email and any attachments thereto.
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
begin:vcard
fn;quoted-printable:Bernat R=C3=A0fales
n;quoted-printable:R=C3=A0fales;Bernat
org:Tango/04 Computing Group SL;Research & Development
adr:;;Av. Meridiana, 358, 5 A-B;Barcelona;Barcelona;08027;Spain
email;internet:brafa...@tango04.net
title:Developer
tel;work:+34932740051
x-mozilla-html:FALSE
url:http://tango04.com
version:2.1
end:vcard
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com