Re: edsharp error when using pydent

  • From: Jamal Mazrui <empower@xxxxxxxxx>
  • To: Blind Programming List <programmingblind@xxxxxxxxxxxxx>
  • Date: Tue, 15 Sep 2009 11:51:17 -0400 (EDT)

The Mail feature only works with the default MAPI client, so will launch
either Outlook or Outlook Express.  I do not know of a way to make it
work with any mail client with a message body long enough for a full
stack trace.  Glad you were able to use the copy to clipboard option
instead.

Since your file had a .py extension, EdSharp thought it was already in
PyDent format, and got confused.  I may try to improve the intelligence
there, but if you save the file with a .pyb extension instead (standing
for PyBrace format), the Alt+LeftBracket command will work -- I just
tried it on your code.  It will also work if you have code in a document
that has not yet been saved to disk (so there is no extension that
confuses EdSharp).

Hope this helps,
Jamal

On Mon, 14 Sep 2009, Alex Hall wrote:

> Date: Mon, 14 Sep 2009 15:33:33 -0400
> From: Alex Hall <mehgcap@xxxxxxxxx>
> Reply-To: programmingblind@xxxxxxxxxxxxx
> To: Blind Programming List <programmingblind@xxxxxxxxxxxxx>
> Subject: edsharp error when using pydent
>
> Here is the error I was just talking about in my previous message; I used
> the "copy to clipboard" option, but I would still like to get that mail
> client problem fixed. Anyway, this happens when I create a new file with a
> .py extension and write python with braces, then try to use pydent to
> convert braces to python's indents and colon notation. My code is:
>
> import sys
> print("Enter a number:")
> a=raw_input()
> print("Enter a second number:")
> b=raw_input()
> print(add(a,b))
>
> def add(x,y){
> return x+y
> }
>
> The error is pasted below:
>
> Index was out of range. Must be non-negative and less than the size of the
> collection.
> Parameter name: index
>
> Stack trace:
>    at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument
> argument, ExceptionResource resource)
>    at System.ThrowHelper.ThrowArgumentOutOfRangeException()
>    at System.Collections.Generic.List`1.get_Item(Int32 index)
>    at EdSharp.HomerList.Pop()
>    at EdSharp.MdiFrame.PyBrace2Dent(String sText)
>    at EdSharp.MdiFrame.menuItem_Click(Object sender, EventArgs e)
>    at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
>    at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
>    at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
>    at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e,
> ToolStripItemEventType met)
>    at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e,
> ToolStripItemEventType met)
>    at System.Windows.Forms.ToolStripItem.PerformClick()
>    at EdSharp.MdiFrame.ProcessCmdKey_Helper(Message& msg, Keys keyData)
>    at EdSharp.HomerRichTextBox.ProcessCmdKey(Message& msg, Keys keyData)
>    at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
>    at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control
> target, Message& msg)
>    at
> System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
>
>
> Have a great day,
> Alex
> New email address: mehgcap@xxxxxxxxx
>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: