Re: [IronPython] DataBinding from IronPython Object to WPF Property

2009-08-05 Thread Steve Apiki
Hi Curt, Thanks, just what I needed and the performance is definitely acceptable if you keep trackedNames to a minimum. --Steve - Original Message - From: "Curt Hagenlocher" To: "Discussion of IronPython" Sent: Wednesday, August 5, 2009 8:35:15 PM GMT -05:00 US/Canada Eastern Subject:

Re: [IronPython] DataBinding from IronPython Object to WPF Property

2009-08-05 Thread Curt Hagenlocher
Oops -- I should have pointed out that pyevent.py is in the standard IronPython distribution; probably in a directory called "samples" or "tutorial". (Network service in the bus is flaky, so I'm finding it hard to check.) On Wed, Aug 5, 2009 at 5:35 PM, Curt Hagenlocher wrote: > Python's __setat

Re: [IronPython] DataBinding from IronPython Object to WPF Property

2009-08-05 Thread Curt Hagenlocher
Python's __setattr__ hook makes INotifyPropertyChanged easy to implement if you're willing to pay the performance penalty. Just derive from a class like this one: class PropertyChangeNotifier(INotifyPropertyChanged): def __init__(self, *trackedNames): self._PropertyChanged, self._OnPro

Re: [IronPython] -X:EnableProfiler and DLR hosting API (2.6b2)

2009-08-05 Thread Michael Foord
David DiCato wrote: You have to pass the required options to Python.CreateEngine, like so: var options = new Dictionary(); options[“EnableProfiler”] = ScriptingRuntimeHelpers.True; ver engine = Python.CreateEngine(options); Are these options for IronPython 2.6 documented anywhere? Michael

Re: [IronPython] DataBinding from IronPython Object to WPF Property

2009-08-05 Thread Steve Apiki
Hi Dino, Thanks for your quick answer and for making things clear on INotifyPropertyChanged. I'd like to have my own derived classes for this project so I think I'm going to steer clear of ExpandoObject and look into implementing INotifyPropertyChanged. And I tried out your suggestion for #2

Re: [IronPython] DataBinding from IronPython Object to WPF Property

2009-08-05 Thread Dino Viehland
IronPython doesn't actually support INotifyPropertyChanged - it only supports custom type descriptor so that WPF can get at the values but it doesn't get the change notifications. You could make an instance of ExpandoObject which does support it: import clr clr.AddReference('Microsoft.Scripting.C

[IronPython] DataBinding from IronPython Object to WPF Property

2009-08-05 Thread Steve Apiki
Hello, I'm working with IronPython 2.6 Beta 1. I have the following Python class: class Person(object): def __init__(self, name): self.name = name I'd like to be able to bind the name property of an instance of this class to a WPF textbox control. I can do this easily enough eithe

Re: [IronPython] -X:EnableProfiler and DLR hosting API (2.6b2)

2009-08-05 Thread David DiCato
You have to pass the required options to Python.CreateEngine, like so: var options = new Dictionary(); options["EnableProfiler"] = ScriptingRuntimeHelpers.True; ver engine = Python.CreateEngine(options); Hope this helps, - David From: users-boun...@lists.ironpython.com [mailto:users-boun...@lis

[IronPython] IronPython 2.6 CodePlex Source Update

2009-08-05 Thread merllab
This is an automated email letting you know that sources have recently been pushed out. You can download these newer sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/57718. MODIFIED SOURCES $/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/Pyth

[IronPython] -X:EnableProfiler and DLR hosting API (2.6b2)

2009-08-05 Thread Mads Weitling
Hi all and many thanks to Dino Viehland for answering my previous question re: sys.builtin_module_names and embedding. I am trying to use the IronPython profiler ( http://blogs.msdn.com/curth/archive/2009/03/29/an-ironpython-profiler.aspx) from an embedded interpreter but cannot figure out how to