It seems inheriting from INotifyPropertyChanged is the cause
self.window =
System.Windows.Markup.XamlReader.Load(outStream)self.window.DataContext =
MyViewModel()class MyViewModel(System.Object):__namespace__ = "WPFPyDemo"
def __init__(self):super(MyViewModel,self).__init__()
What's the full stack trace?
I suspect it's something to do with the event declared on the interface not
being implemented. The managed type constructed doesn't define any events,
so that would cause the construction of the type of fail - which is
probably the error you're getting (although withou
Yeah, it looks like the crash is probably because of the missing event
implementation as suspected. I'm a bit surprised that it didn't fail
earlier when trying to instantiate the type.
If you do get a chance to take a look at adding that functionality be sure
to submit a pull request!
Best regard
Tony,
thanks for the hint.
the event PropertyChanged was declared in INotifyPropertyChanged interface by
pythonnet, but obviously not implemented. [('PropertyChanged', ),
anyway, the stackoverflow only happens if both following are present1. the
class is derived from INotifyPropertyChanged inte
is it possible to workaround this non-implemented feature by using
___setattr__() hook? seems like people were able to do this in ironpython:
http://stackoverflow.com/questions/3856905/
On Sun, Apr 3, 2016 at 10:40 AM, Tony Roberts wrote:
> Yeah, it looks like the crash is probably because of t
t; @inputText.setter
> >> def inputText(self,value):
> >> self._inputText = value
> >> self.OnPropertyChanged("inputText")
> >>
> >> self.window.DataContext = MyViewModel()
> >>
> >> The one direction