When I run that code (with Visual Studio 2010, Silverlight 4, and IronPython 2.7) I get a Python syntax error "unexpected token <newline>", because you don't have a ":" after the __init__ function. When that is corrected, your example works properly.
Here's the working example: http://jimmy.schementi.com/silverlight/ipysl-repro20100824.zip. See the Bin\Debug directory ... the HTML file and XAP for the app are in there, which contains the IronPython assemblies. ~Jimmy On Tue, Aug 24, 2010 at 9:54 AM, Fortelny, Stephan < stephan.forte...@rubicon.eu> wrote: > hi there, > > i'm trying to use ironpython embedded in silverlight > > there is a tutorial here * > http://www.voidspace.org.uk/ironpython/silverlight/embedding_ironpython.shtml > * but it seems that you can not define your own classes. > > When doing this in a script i get an "MethodAccessException" when accessing > "System.RuntimeMethodHandle.get_Value()" somewhere in the ctor of the > defined class. > > This due to Silverlight having no security privileges so does anybody know > how to solve this? > > > > My code sample http://pastebin.com/7j8iXEAE which basically creates a > ironpython script extracting it to a delegate. Then it calls the defined > function. IronPython stdout is set to a stream which is used later to set > the text of a textbox > > _______________________________________________ > Users mailing list > Users@lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > >
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com