[IronPython] Ironpython 2 Alpha 4

David.Lawler at franke.com David.Lawler at franke.com
Tue Sep 11 18:31:53 CEST 2007


Hi Dino,

Here it is.  Thanks for taking a look at it.

"C:\Program Files\IronPython2A4\ipy.exe" -X:ExceptionDetail 
-X:ShowClrExceptions "IronPythonDev.py"

ICSharpCode.TextEditor.Document.DefaultDocument.set_HighlightingStrategy(ICSharpCode.TextEditor.Document.IHighlightingStrategy)
   at _stub_##40(Object[] , DynamicSite`3 , CodeContext , Object , Object 
)
   at 
Microsoft.Scripting.Actions.DynamicSite`3.UpdateBindingAndInvoke(CodeContext 
context, T0 arg0, T1 arg1)
   at 
Microsoft.Scripting.Actions.DynamicSiteHelpers.UninitializedTargetHelper`7.Invoke2(DynamicSite`3 
site, CodeContext context, T0 arg0, T1 arg1)
   at Microsoft.Scripting.Actions.DynamicSite`3.Invoke(CodeContext 
context, T0 arg0, T1 arg1)
   at __main__$mod_2.__init__$3(CodeContext $context, Object self) in 
IronPythonDev.py:line 28
   at _stub_##15(Object[] , DynamicSite`3 , CodeContext , Object , Object 
)
   at 
Microsoft.Scripting.Actions.DynamicSite`3.UpdateBindingAndInvoke(CodeContext 
context, T0 arg0, T1 arg1)
   at 
Microsoft.Scripting.Actions.DynamicSiteHelpers.UninitializedTargetHelper`7.Invoke2(DynamicSite`3 
site, CodeContext context, T0 arg0, T1 arg1)
   at Microsoft.Scripting.Actions.DynamicSite`3.Invoke(CodeContext 
context, T0 arg0, T1 arg1)
   at _stub_##14(Object[] , DynamicSite`2 , CodeContext , Object )
   at 
Microsoft.Scripting.Actions.DynamicSite`2.UpdateBindingAndInvoke(CodeContext 
context, T0 arg0)
   at 
Microsoft.Scripting.Actions.DynamicSiteHelpers.UninitializedTargetHelper`7.Invoke1(DynamicSite`2 
site, CodeContext context, T0 arg0)
   at Microsoft.Scripting.Actions.DynamicSite`2.Invoke(CodeContext 
context, T0 arg0)
   at _stub_##12(Object[] , FastDynamicSite`2 , Object )
   at 
Microsoft.Scripting.Actions.FastDynamicSite`2.UpdateBindingAndInvoke(T0 
arg0)
   at 
Microsoft.Scripting.Actions.DynamicSiteHelpers.UninitializedTargetHelper`7.FastInvoke1(FastDynamicSite`2 
site, T0 arg0)
   at Microsoft.Scripting.Actions.FastDynamicSite`2.Invoke(T0 arg0)
   at __main__$mod_2.Initialize(CodeContext ) in IronPythonDev.py:line 75
   at Microsoft.Scripting.ScriptCode.Run(CodeContext codeContext, Boolean 
tryEvaluate)
   at Microsoft.Scripting.ScriptModule.Execute()
   at IronPython.Hosting.PythonCommandLine.RunFileWorker(String fileName)
   at IronPython.Hosting.PythonCommandLine.RunFile(String filename)

SystemError: 
ICSharpCode.TextEditor.Document.DefaultDocument.set_HighlightingStrategy(ICSharpCode.TextEditor.Document.IHighlightingStrategy)

CLR Exception: 

    MethodAccessException
: 
ICSharpCode.TextEditor.Document.DefaultDocument.set_HighlightingStrategy(ICSharpCode.TextEditor.Document.IHighlightingStrategy)

>Exit code: 1
users-bounces at lists.ironpython.com wrote on 09/11/2007 12:02:49 PM:

> It definitely looks like a bug - maybe related to the fact that 
> these are interface methods & properties.  Could I get you to do one
> more thing and re-run w/ -X:ExceptionDetail and -X:ShowClrExceptions?
> 
> I've opened a bug (http://www.codeplex.com/IronPython/WorkItem/View.
> aspx?WorkItemId=12708) to track the issue.  We're in bug fixing mode
> for the next 4 weeks so hopefully we can get this (and many other 
> issues that have been piling up) fixed for the next release.  Thanks
> for the report.
> 
> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of David.Lawler at franke.com
> Sent: Tuesday, September 11, 2007 8:52 AM
> To: Discussion of IronPython
> Subject: Re: [IronPython] Ironpython 2 Alpha 4
> 
> Yes I can - thanks for the quick reply!
> 
> >"C:\Program Files\IronPython2A4\ipy.exe" -X:ExceptionDetail
> "IronPythonDev.py"
> ICSharpCode.TextEditor.Document.DefaultDocument.
> set_HighlightingStrategy(ICSharpCode.TextEditor.Document.
> IHighlightingStrategy)
>    at _stub_##40(Object[] , DynamicSite`3 , CodeContext , Object , 
Object
> )
>    at
> 
Microsoft.Scripting.Actions.DynamicSite`3.UpdateBindingAndInvoke(CodeContext
> context, T0 arg0, T1 arg1)
>    at
> Microsoft.Scripting.Actions.DynamicSiteHelpers.
> UninitializedTargetHelper`7.Invoke2(DynamicSite`3
> site, CodeContext context, T0 arg0, T1 arg1)
>    at Microsoft.Scripting.Actions.DynamicSite`3.Invoke(CodeContext
> context, T0 arg0, T1 arg1)
>    at __main__$mod_2.__init__$3(CodeContext $context, Object self) in
> IronPythonDev.py:line 28
>    at _stub_##15(Object[] , DynamicSite`3 , CodeContext , Object , 
Object
> )
>    at
> 
Microsoft.Scripting.Actions.DynamicSite`3.UpdateBindingAndInvoke(CodeContext
> context, T0 arg0, T1 arg1)
>    at
> Microsoft.Scripting.Actions.DynamicSiteHelpers.
> UninitializedTargetHelper`7.Invoke2(DynamicSite`3
> site, CodeContext context, T0 arg0, T1 arg1)
>    at Microsoft.Scripting.Actions.DynamicSite`3.Invoke(CodeContext
> context, T0 arg0, T1 arg1)
>    at _stub_##14(Object[] , DynamicSite`2 , CodeContext , Object )
>    at
> 
Microsoft.Scripting.Actions.DynamicSite`2.UpdateBindingAndInvoke(CodeContext
> context, T0 arg0)
>    at
> Microsoft.Scripting.Actions.DynamicSiteHelpers.
> UninitializedTargetHelper`7.Invoke1(DynamicSite`2
> site, CodeContext context, T0 arg0)
>    at Microsoft.Scripting.Actions.DynamicSite`2.Invoke(CodeContext
> context, T0 arg0)
>    at _stub_##12(Object[] , FastDynamicSite`2 , Object )
>    at
> Microsoft.Scripting.Actions.FastDynamicSite`2.UpdateBindingAndInvoke(T0
> arg0)
>    at
> Microsoft.Scripting.Actions.DynamicSiteHelpers.
> UninitializedTargetHelper`7.FastInvoke1(FastDynamicSite`2
> site, T0 arg0)
>    at Microsoft.Scripting.Actions.FastDynamicSite`2.Invoke(T0 arg0)
>    at __main__$mod_2.Initialize(CodeContext ) in IronPythonDev.py:line 
75
>    at Microsoft.Scripting.ScriptCode.Run(CodeContext codeContext, 
Boolean
> tryEvaluate)
>    at Microsoft.Scripting.ScriptModule.Execute()
>    at IronPython.Hosting.PythonCommandLine.RunFileWorker(String 
fileName)
>    at IronPython.Hosting.PythonCommandLine.RunFile(String filename)
> 
> SystemError:
> ICSharpCode.TextEditor.Document.DefaultDocument.
> set_HighlightingStrategy(ICSharpCode.TextEditor.Document.
> IHighlightingStrategy)
> 
> >Exit code: 1
> 
> 
> users-bounces at lists.ironpython.com wrote on 09/11/2007 11:20:48 AM:
> 
> > Is line 28:
> >
> >         HighlightingManager.Manager.
> > AddSyntaxModeFileProvider(FileSyntaxModeProvider(sys.path[0]));
> >
> > ?
> >
> > Can you provide the text of the exception (even better w/ the -X:
> > ExceptionDetail command line option) ?
> >
> > -----Original Message-----
> > From: users-bounces at lists.ironpython.com [mailto:users-
> > bounces at lists.ironpython.com] On Behalf Of David.Lawler at franke.com
> > Sent: Tuesday, September 11, 2007 6:40 AM
> > To: users at lists.ironpython.com
> > Subject: [IronPython] Ironpython 2 Alpha 4
> >
> > The following ugly hack works fine with IronPython 1.1 and with 2.0
> alpha
> > 3 but raises an exception on line 28 with IronPython 2.0 alpha 4.
> > To run this you need a copy of the ICSharpCode.TextEditor.dll from
> > SharpDevelop (http://www.icsharpcode.net/OpenSource/SD).
> > Is this a bug or a new 'feature'?  Is there a work-around?  Thanks. 
DJL
> >
> > import clr
> > import sys
> >
> > clr.AddReference('System.Windows.Forms')
> > clr.AddReference('System.Drawing')
> > clr.AddReference('ICSharpCode.TextEditor')
> >
> > from System.IO import (Path, Directory, FileInfo)
> > from System.Windows.Forms import *
> > from System.Drawing import (Color, Font, FontStyle, GraphicsUnit, 
Point,
> > Size)
> > from ICSharpCode.TextEditor import *
> > from ICSharpCode.TextEditor.Document import *
> >
> > class ExecuteForm(Form):
> >
> >     def __init__(self):
> >
> >         self.Size = Size(1024, 768)
> >         self.Text = "IronPythonDev"
> >
> >         self.editor = TextEditorControl()
> >         self.editor.Location = Point(0,20)
> >         self.editor.Enabled = True
> >         self.editor.Size = Size(1000, 700)
> >         self.editor.Anchor = AnchorStyles.Top | AnchorStyles.Left |
> > AnchorStyles.Right | AnchorStyles.Bottom
> >
> >
> > HighlightingManager.Manager.
> > AddSyntaxModeFileProvider(FileSyntaxModeProvider(sys.path[0]));
> >
> >         self.editor.Document.HighlightingStrategy =
> > HighlightingManager.Manager.FindHighlighter("Python");
> >         self.editor.ShowEOLMarkers = False
> >         self.editor.ConvertTabsToSpaces = True
> >         self.Controls.Add(self.editor)
> >
> >         # Create the menu
> >         mainMenu1 = MainMenu()
> >
> >         fileMenu = MenuItem()
> >         fileMenu.Text = "File"
> >         menuItemOpen = MenuItem()
> >         menuItemOpen.Text = "Open..."
> >         menuItemOpen.Click += self.OpenMenuHandler
> >         menuItemSave = MenuItem()
> >         menuItemSave.Text = "Save..."
> >         menuItemSave.Click += self.SaveMenuHandler
> >         menuItemExit = MenuItem()
> >         menuItemExit.Text = "Exit"
> >         menuItemExit.Click += self.ExitMenuHandler
> >         fileMenu.MenuItems.Add(menuItemOpen)
> >         fileMenu.MenuItems.Add(menuItemSave)
> >         fileMenu.MenuItems.Add(menuItemExit)
> >
> >         mainMenu1.MenuItems.Add(fileMenu)
> >         self.Menu = mainMenu1
> >
> >         self.OpenDialog = OpenFileDialog()
> >         self.OpenDialog.Filter = "*.py|*.*"
> >         self.FileName = None
> >         self.InitCurrDir = Directory.GetCurrentDirectory()
> >
> >     def OpenMenuHandler(self, source, ev):
> >
> >         if self.OpenDialog.ShowDialog() == DialogResult.OK:
> >
> >             self.FileName = self.OpenDialog.FileName
> >             self.editor.LoadFile(self.FileName)
> >             ext = self.FileName.lower().split(".")[-1]
> >
> >     def SaveMenuHandler(self, source, ev):
> >
> >         self.editor.SaveFile(self.FileName)
> >
> >     def ExitMenuHandler(self, source, ev):
> >         self.Close()
> >
> > Application.EnableVisualStyles()
> > form = ExecuteForm()
> > Application.Run(form)
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> > _______________________________________________
> > Users mailing list
> > Users at lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> 
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




More information about the Ironpython-users mailing list