[Ironpython-users] How do I get access to the objects of this class which is loaded XAML

2012-05-17 Thread sepatan
How do I get access to the objects of this class which is loaded XAML. Given that the objects are presented to the CLR types? What namespace should be specified? The text below gives an error. 1) module proba.py: import WPF class MyWindow(Window): # p - CLR t

Re: [Ironpython-users] How do I get access to the objects of this class which is loaded XAML

2012-05-17 Thread Pascal Normandin
Hello, I'm not sure about the LoadComponent method but I have used the XamlReader.Parse(xaml) and it works well for me. Using something like sr = StreamReader(path) userCtrl = XamlReader.Load(sr.BaseStream) Content = userCtrl Hope that helps; Pascal -Original Message- From: ironpython-

Re: [Ironpython-users] How do I get access to the objects of this class which is loaded XAML

2012-05-17 Thread Jeff Hardy
Without seeing the whole program (or a minimal reproduction) it's hard to see, but I think you want: def button1_Click(self, sender, e): MessageBox.Show(self.p.name) It would help if you included the exact error. - Jeff On Thu, May 17, 2012 at 3:39 AM, wrote: > How do I get access

[Ironpython-users] [Fwd: RE: How do I get access to the objects of this class which is loaded XAML]

2012-05-17 Thread sepatan
Hello, That is, if the load XAML, as specified below, the Label (Lab1) can be binding on the CLR type (p.name) is defined in proba.py (do not forget that the code is the XAML load in proba.py)? --- Original Message --- Тема: RE: [Ironpython-users] H

[Ironpython-users] Work started on django-mssql for django 1.4

2012-05-17 Thread Vernon Cole
For those who may be interested, Michael Manfre has posted on django-developers that he has started porting django-mssql to django 1.4. Since this variant is of most interest to IronPython users, someone may want

Re: [Ironpython-users] [Fwd: RE: How do I get access to the objects of this class which is loaded XAML]

2012-05-17 Thread Pascal Normandin
To enable Data binding you need to set the DataContext property of the object loaded from xaml you could do something like this sr = StreamReader(path) userCtrl = XamlReader.Load(sr.BaseStream) Content = userCtrl userCtrl.DataContext = self -Original Message- From: ironpython-users-bounce

Re: [Ironpython-users] [Fwd: RE: How do I get access to the objects of this class which is loaded XAML]

2012-05-17 Thread sepatan
Hello, Pascal. Thank you for your help. Working. Used wpf.LoadComponent. Here is the complete code (case study). Can anyone come in handy. Still, I would like to know whether it is possible to determine the XAML namespace environment in which IronPython loaded XAML (for example because: xmlns: n