Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Possible bug causing InvalidOperationException - RapidSpell Desktop .NET - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
areichhart
#1 Posted : Thursday, April 27, 2017 12:56:59 PM
Rank: Member

Groups: Registered

Joined: 3/28/2017
Posts: 12
Location: Graz, Austria
Hey there,

i recently added Spellchecking to many standard winform - textboxes across the application.
To do that i intialize a rapidspellasyoutype object once on global level, and add on the Form_Load events whenever i require spellchecking.

rapidSpell.AddTextBoxBase(textbox1);
HOWEVER:
If you close that form fast (so that rapidspell.AddTextBoxBase started threads aren'T finished you will get an InvalidOperationException - (Invoke or BeginInvoke cannot be called on a control until the window handle has been created)
StackTrace:
System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)

What crashes the whole application with a TargetInvocationException,

If you add rapidSpell.RemoveTextBoxBase(textbox1) on the FormClosing event the problem can be resolved. I first tried it on Dispose, but that's to late ... )
Still for rapidSpell.AddTextComponent this issue doesn't exist.

I think the issue is very mean, as it only occurs if you close the Form fast (what isn't a standard use/test case).
So this one gave me quite some headache.
I hope you can fix it for future releases.

Best regards,
Alwin
Dan
#2 Posted : Thursday, April 27, 2017 1:28:49 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 10/20/2004
Posts: 456
Hi Alwin,

Thank you for your post. I will make sure a developer looks at this today and if necessary we'll post here with an update.

Thanks again.

Dan
Keyoti
Dan Wright
Jim
#3 Posted : Thursday, April 27, 2017 4:56:45 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
Hi Alwin, thanks for your bug report and for posting a workaround. I'll log it to be fixed in the next release. If you do need it sooner (sounds like you won't) then just let me know.


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


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.