CompleteWord and Length argument

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Harry Graave - IT-Consultancy, TeamWiSE GmbH
Avatar
Hi!

is it possible, that the CompleteWord method of the MemberList contains a bug? If the length passed is greater than 9, an ArgumentOutOfRangeException occurs. I circumvented this with the following code:

if (tok.Length > 9)
{
memberList.Show(tok.StartOffset, tok.Length);
}
else
{
memberList.CompleteWord(tok.StartOffset, tok.Length);
}

but ofcourse this is not what i really want... I checked and double-checked everything: the offset and length are within limits. Perhaps you can reproduce the problem? I'm using Version 2.5.158.0.

Regards,
Harry

Comments (4)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Harry,

Could you first make sure that adding more than 9 to the start offset is not going past the end of the document? That's what I suspect is happening here. If the offset + length added together exceeds the end of the document then you will get that exception. Let me know if that's what it is in your case.


Actipro Software Support

Posted 14 years ago by Harry Graave - IT-Consultancy, TeamWiSE GmbH
Avatar
Hi!,

no it's not past the end of document. I can reproduce it at any point in the text with length > 9. I checked all appropriate values in debug-mode.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Try getting the latest maintenance release and see if that helps. I tried it in 2.5.0160 and used a length of 11 and had no problems.


Actipro Software Support

Posted 14 years ago by Harry Graave - IT-Consultancy, TeamWiSE GmbH
Avatar
I'll try so next week. We're finishing off a maintenance release ourselves, and I'd hate to introduce a new SyntaxEditor version so close to the deadline. I'll let you know.
The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.