Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

"- causes ArgumentOutOfRangeException - Thesaurus Desktop .NET - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
Guest
#1 Posted : Friday, December 7, 2007 7:51:19 AM
Rank: Guest

Groups:

Joined: 2/14/2015
Posts: 1,322


If you have a field which contains a quote and a dash (ie "-) then Keyoti thesaurus crashes with:

System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at Keyoti.Thesaurus.Windows.Thesaurus.GetWord(Int32 caretPosition, Int32 selectionLength, String text)
at BBCNewsI.CPS.UI.Controls.CPSThesaurus.GetSuggestionToolStripMenuItems() in D:\Work\cps\v5\client\main\management\BBCNewsI.CPS.UI\Controls\CPSThesaurus.cs:line 39
at BBCNewsI.CPS.UI.Controls.CPSTextBoxContextMenuStrip.OnOpening(CancelEventArgs e) in D:\Work\cps\v5\client\main\management\BBCNewsI.CPS.UI\Controls\CPSTextBoxContextMenuStrip.cs:line 258
at System.Windows.Forms.ToolStripDropDown.SetVisibleCore(Boolean visible)
at System.Windows.Forms.ContextMenuStrip.SetVisibleCore(Boolean visible)
at System.Windows.Forms.ToolStripDropDown.Show(Control control, Point position)
at System.Windows.Forms.ContextMenuStrip.ShowInternal(Control source, Point location, Boolean isKeyboardActivated)
at System.Windows.Forms.Control.WmContextMenu(Message& m, Control sourceControl)
at System.Windows.Forms.Control.WmContextMenu(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
at System.Windows.Forms.TextBox.WndProc(Message& m)
at Keyoti.RapidSpell.AYTTextBox.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Guest
#2 Posted : Friday, December 7, 2007 8:02:56 AM
Rank: Guest

Groups:

Joined: 2/14/2015
Posts: 1,322
Sorry, should have mentioned that you need to have the text selected before bringing up the context menu in order to see the crash.
Jim
#3 Posted : Friday, December 7, 2007 3:10:11 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Can you try this build please http://keyoti.com/downlo...releases/THDT-1.0.3.zip as it appears to work OK for me. If not, can you give me an example string and which word to select please?

Thanks
Jim
-your feedback is helpful to other users, thank you!


Guest
#4 Posted : Monday, December 10, 2007 7:47:50 AM
Rank: Guest

Groups:

Joined: 2/14/2015
Posts: 1,322
I tried the new version and got the same error.

I first noticed it when I right clicked a textbox containing:

"Hatton is a great boxer but I honestly feel Mayweather is just too good for him" - CB

If all the text is selected and I right-click, then the following code throws the error:

Thesaurus.GetWord(86, 86, "\"Hatton is a great boxer but I honestly feel Mayweather is just too good for him" - CB");

However, it will also throw the error if the textbox only contains "-:

Thesaurus.GetWord(2, 2, "\"-");

Jim
#5 Posted : Monday, December 10, 2007 6:21:04 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Thanks, I didn't realise you meant to select all the text with the quotes at the start.

This will fix it; http://keyoti.com/downlo...ses/THDT-1.0.3.1210.zip

Best
Jim
-your feedback is helpful to other users, thank you!


Guest
#6 Posted : Tuesday, December 11, 2007 8:53:15 AM
Rank: Guest

Groups:

Joined: 2/14/2015
Posts: 1,322
Yup, that fixed it.

Thanks.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.