|
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)
|
|
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.
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 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!
|
|
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, "\"-");
|
|
Rank: Advanced Member
Groups: Administrators, Registered
Joined: 8/13/2004 Posts: 2,669 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!
|
|
Rank: Guest
Groups:
Joined: 2/14/2015 Posts: 1,322
|
Yup, that fixed it.
Thanks.
|
|