Re: [IronPython] Dynamic keyword, Ironpython and Silverlight?

2010-06-06 Thread Kristian Jaksch
In the example I attached I'm not even sure that the "dynamic" keyword is the problem here. Even if I do like below (in silverlight): var ipy = Python.CreateRuntime(); ipy.UseFile("test.py"); //This still throws the same exception Does anyone perhaps has a working SL examp

[IronPython] Dynamic keyword, Ironpython and Silverlight?

2010-06-06 Thread Kristian Jaksch
Sorry if I've double sent this mail but I wasn't registred the first time and I'm not sure it got through: Is it possible to access IronPython code by using the dynamic keyword in Silverlight 4? I've found some examples like below: var ipy = Python.CreateRuntime(); dynamic

[IronPython] Abort thread Ironpython Silverlight

2009-06-17 Thread Kristian Jaksch
I have developed a Silverlight application that uses IronPython to dynamically generate and execute a script. The script is dependent on data supplied by the user and can be computationally expensive so it's run on a separate thread. I need an option for the user to abort the script in case it hang

[IronPython] Generate xap for SL when assemblies are located in sub-directory

2009-06-10 Thread Kristian Jaksch
This works fine when the xap is generated in memory with /b from VS 2008 but how to make it work when creating a real app.xap file? What I have is this: root/app/dependencies chiron is located in the "root". The "app.py" is located in "app" and the assemblies are located in "dependencies". The

Re: [IronPython] How to get access to enum?

2009-05-04 Thread Kristian Jaksch
-- > From: users-boun...@lists.ironpython.com > [mailto:users-boun...@lists.ironpython.com] On Behalf Of Kristian Jaksch > Sent: Monday, May 04, 2009 7:25 AM > To: users@lists.ironpython.com > Subject: [IronPython] How to get access to enum? > > How can I get access to enums in

[IronPython] How to get access to enum?

2009-05-04 Thread Kristian Jaksch
How can I get access to enums in IronPython? For example, when running IronPython + Silverlight I need access to the Visibility enum: btnMaxPlot.Visibility = Visibility.Collapsed This results in an error: "NameError: name 'Visibility' is not defined" Thanks

[IronPython] Is Silverlight 3 beta supported in Ironpython yet?

2009-04-30 Thread Kristian Jaksch
Does Ironpython support Silverlight 3 beta yet? /Kristian ___ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: [IronPython] Best way to stop script execution?

2009-03-20 Thread Kristian Jaksch
:* users-boun...@lists.ironpython.com [mailto: > users-boun...@lists.ironpython.com] *On Behalf Of *Kristian Jaksch > *Sent:* Friday, March 20, 2009 6:00 AM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] Best way to stop script execution? > > > > What about if we need access to th

Re: [IronPython] Best way to stop script execution?

2009-03-20 Thread Kristian Jaksch
What about if we need access to the HTML DOM (It's a silverlight application) from that thread? During execution of scripts there might be printouts to the DOM. But how can we do that without illegal cross-threading? 2009/3/19 Kristian Jaksch > Thanks for the reply. > > No, we

Re: [IronPython] Best way to stop script execution?

2009-03-19 Thread Kristian Jaksch
Thanks for the reply. No, we haven't placed the script execution in their own thread. I guess the best way must be just to place the exec command in that thread. I'll check out Thread.Abort. 2009/3/19 Michael Foord > Kristian wrote: > >> We let users execute scripts in

[IronPython] Best way to stop script execution?

2009-03-19 Thread Kristian
We let users execute scripts in our app using the exec command. We want to provide a stop button to stop script execution but how is the best way to do that? Can a background worker be used for that? Thanks for help! ___ Users mailing list Users@lists.ir

[IronPython] Overflow error with C# dll

2009-01-30 Thread Kristian
I've created a C# dll that I call from Ironpython (Silverlight) application. I receive an Overflow error when I call it but I can't see that anything is wrong. Everything works as expected. The error is below: "OverflowError: Arithmetic operation resulted in an overflow." But when I call the same

Re: [IronPython] IronPython to JavaScript

2009-01-25 Thread Kristian
Just curios... Has anyone had time to look at my sample yet? On Jan 14, 11:11 pm, Jimmy Schementi wrote: > Thanks, I'll take a look at it. > > > > > -Original Message- > > From: users-boun...@lists.ironpython.com [mailto:users- > > boun...@lists.ir

Re: [IronPython] IronPython to JavaScript

2009-01-14 Thread Kristian Jaksch
setCode; > } > > You pass this function in the online parameter in the Silverlight object > element: > >data="data:application/x-silverlight," type="application/x-silverlight-2" > width="450" height="540"> >

Re: [IronPython] IronPython to JavaScript

2009-01-13 Thread Kristian Jaksch
Thanks for the reply! No, I can't get it to work with Javascript either. I added the script below to my page: function some_function(sender, args) { value = args.val; alert(value); } control = document.getEleme

Re: [IronPython] Problem loading IronPython Silverlight app

2009-01-12 Thread Kristian Jaksch
Thanks for the reply! It seems like the problem was that the SL2 application tried to connect to the DOM during startup. I can find an alternative solution to that so it won't be a problem. I haven't been able to reproduce the problem so I think it's fixed. Thanks very much! 2009/1/12 Jimmy Sch

Re: [IronPython] Get a string from JavaScript to IronPython

2009-01-06 Thread Kristian
Thanks for the reply. I actually got it to work straight away :-) On Jan 6, 4:07 pm, Michael Foord wrote: > Kristian wrote: > > I have a code editor written in JavaScript on my page and I want to > > send the code that it is typed in as a string to IronPython so that it > >

[IronPython] Get a string from JavaScript to IronPython

2009-01-06 Thread Kristian
I have a code editor written in JavaScript on my page and I want to send the code that it is typed in as a string to IronPython so that it can be executed from IronPython. I got this to work in C# but not in IronPython. Below is the JavaScript I use: var textarea = document

Re: [IronPython] MouseButtonDownEvent doesn't fire + which tool to work in?

2008-12-21 Thread Kristian Jaksch
This is no all the code but even if I skip the 'if'-statement and have it like below: *def inputBox_MouseLeftButtonDown(s, e): root.inputBox.Text = ""* it still doesn't work. And if I put a breakpoint at the "*def inputBox_MouseLeftButtonDown(s, e):*"-line it isn't fired. 2008/12/21 Curt

Re: [IronPython] Online IronPython interpreter and DLRconsole.

2008-12-20 Thread Kristian Jaksch
Thanks for the replies. Ok, so it's HTML and JavaScript only. Hmm... I think I try to cheat in some way to get a similar feeling but with a couple of Silverlight controls. 2008/12/20 Jimmy Schementi > DLRConsole isn't really reusable today, which is why I've been rewriting it > in C# and adding

Re: [IronPython] Newbie: convert string to python expression??

2008-12-16 Thread Kristian Jaksch
Michael, Thank you for your help! It finally works. Now there is lots of other things left but this has really helped a lot. 2008/12/16 Michael Foord > Kristian Jaksch wrote: > >> >> Michael, >> >> What do you mean exec the import * inside the context to

Re: [IronPython] Newbie: convert string to python expression??

2008-12-16 Thread Kristian Jaksch
*" #Doesn't work *Hmmm... think I'm getting tired. Anyway thanks for help! 2008/12/16 Michael Foord > Michael Foord wrote: > >> Kristian Jaksch wrote: >> >>> * >>> def inputBox_KeyDown(s, e): >>> key = e.Key.value_

Re: [IronPython] Newbie: convert string to python expression??

2008-12-16 Thread Kristian Jaksch
Ok, did you mean something like below?: * clr.AddReference("Mapack, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null") from Mapack import *** #A library that contain classes for working with algebra etc.* *context = {} context['m'] = Matrix(5,5)#creating a 5 rows, 5 columns matrix o