Hi All,<br><br>Here is a little app that illustrates an issue that we've just discovered:<br>---------------------------------------------------------------------------------------------------<br>
---------------------------------------------------------------------------------------------------<br>import clr<br>clr.AddReference('System.Windows.Forms')<br>clr.AddReference('IronPython')<br><br>from System.Windows.Forms import Form, Application, TextBox<br>
<br>class MyTextBox(TextBox):<br> def ProcessDialogKey(self, key):<br> print key<br> #super(MyTextBox, self).ProcessDialogKey(key) # Fails with a stack overflow<br> #TextBox.ProcessDialogKey(self, key) # Fails with: Microsoft.Scripting.ArgumentTypeException: cannot access protected member ProcessDialogKey without a python subclass of TextBoxBase<br>
<br>class ThisApp(Form):<br><br> def __init__(self):<br> Form.__init__(self)<br> tb = MyTextBox()<br> self.Controls.Add(tb)<br> Application.Run(self)<br><br><br>def main():<br> f = ThisApp()<br>
<br><br>if __name__ == '__main__':<br> main()<br>
---------------------------------------------------------------------------------------------------<br>
---------------------------------------------------------------------------------------------------<br><br>Uncommenting either of the two commented lines produces the results on that line when a key is pressed in the text box. The second method of calling ProcessDialogKey worked in IPy 1.<br>
<br>This is likely to block our progress on porting Resolver One to IPy2 unless there is a different way of accomplishing the same thing.<br><br>Thanks<br>Glenn & Will<br>