Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Blank thesaurus dialog - Thesaurus Desktop .NET - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
whmbraun
#1 Posted : Monday, October 25, 2010 2:07:10 PM
Rank: Member

Groups: Registered

Joined: 2/1/2010
Posts: 27
I have a thesaurus control on a form and use it with TXTextControl 15.1. It is called from my code like this:

this.thesaurus1.DialogForm.StartPosition = FormStartPosition.CenterParent;
this.thesaurus1.DialogForm.Visible = true;
this.thesaurus1.DialogForm.TopMost = true;
this.thesaurus1.Show();

The first time it is called the dialog is empty (just showing the grey background). All further calls work as expected. Any ideas what could be causing this?

Thanks,
Wolfgang

Wolfgang
Wolfgang
Jim
#2 Posted : Monday, October 25, 2010 2:39:17 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Sorry Wolfgang, I really have no idea what could cause that. Can you reproduce it in our demo project?

The DialogForm is just an empty form holding the ThesaurusControl (UserControl) - you could try explicitly setting that first;

Code:

thesaurus1.DialogForm.ThesaurusControl = thesaurus1.ThesaurusControl
this.thesaurus1.DialogForm.StartPosition = FormStartPosition.CenterParent;
this.thesaurus1.DialogForm.Visible = true;
this.thesaurus1.DialogForm.TopMost = true;
this.thesaurus1.Show();


That may help...

Jim

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

Evaluation Downloads - http://keyoti.com/products
-your feedback is helpful to other users, thank you!


whmbraun
#3 Posted : Tuesday, October 26, 2010 6:52:05 AM
Rank: Member

Groups: Registered

Joined: 2/1/2010
Posts: 27
Thank you for your suggestion, Jim - quick as always!

But I wouldn't have thought it could possibly make a difference (and it didn't) because if the DialogForm didn't have a ThesaurusControl assigned to begin with how would it have worked perfectly every time except for the very first call?

I replaced the call to Show() with a call to ShowDialog() and am now running into this exception:

System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at System.String.Substring(Int32 startIndex, Int32 length)
at Keyoti.Thesaurus.Windows.Thesaurus.GetWord(Int32 caretPosition, Int32 selectionLength, String text)
at Keyoti.Thesaurus.Windows.Thesaurus.OnDialogLoad(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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)

This happens after right-clicking a word in TXTextControl and selecting the menu entry thesaurus which calls your dialog as described before.


Wolfgang
Wolfgang
Jim
#4 Posted : Tuesday, October 26, 2010 3:39:05 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
quote:

But I wouldn't have thought it could possibly make a difference (and it didn't) because if the DialogForm didn't have a ThesaurusControl assigned to begin with how would it have worked perfectly every time except for the very first call?



Well it's all odd - the user control is created when the thesaurus1.ThesaurusControl property is accessed - so I wondered if it would have an effect.

quote:

I replaced the call to Show() with a call to ShowDialog() and am now running into this exception:



Hmm, does it do this every time you select the menu item? Sorry but are you able to put together a simple project that reproduces this? If you can send it via wikisend.com or email to me via support please.

Thanks
Jim

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

Evaluation Downloads - http://keyoti.com/products
-your feedback is helpful to other users, thank you!


whmbraun
#5 Posted : Thursday, November 4, 2010 8:47:39 AM
Rank: Member

Groups: Registered

Joined: 2/1/2010
Posts: 27
Sorry for the delay but I've been working hard with the TXTextControl people to reproduce a bug in their control. I have to say that the so-called "integration" of RapidSpell in TXTextControl is a nightmare (not that I feel entitled to any fingerpointing; I don't know who's "fault" it is and I make too many dumb mistakes myself to feel like blaming anybody...).

What makes me not-amused is that I had no problems with RapidSpell until I bought the "integrated" version. That additonal money spent (not to mention literally weeks of bug-hunting) obviously entitled me to become part of the TXTextControl QA department. Enough ranting... I have to say that their support is very quick and they give the impression that they take the problem seriously. So there is hope - but until the (serious) problems of the RapidSpell integration are fixed, I would advise anyone to hold back on an intended purchase of RapdiSpell from TXTextControl.

NOTE: This critique does not apply to the Keyoti RapidSpell component as such. As I said, I've had no problems with it; the support is very fast and you don't need the "integrated" version to use TXTextControl and RapidSpell in combination. I hope this post spares some people a lot of frustration.

OK, now I'll try to reproduce the thesaurus problem in simple project.

Wolfgang
Wolfgang
whmbraun
#6 Posted : Thursday, November 4, 2010 9:12:06 AM
Rank: Member

Groups: Registered

Joined: 2/1/2010
Posts: 27
This was much quicker than I thought. I have a simple project now that demonstrates the behavior I was describing. How do you want me to send the (VS 2008) project?

Wolfgang
Wolfgang
Jim
#7 Posted : Thursday, November 4, 2010 1:58:07 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Thanks for your thoughts Wolgang - sorry I'm unsure what differences you found (between the integrated and our version), but there's been a major overhaul for TX16 that may or may not (since I dont know what the problems were for you) be better for you. Or just stick with the unintegrated version of course...

Please do could send via http://wikisend.com or email to me via support @ keyoti.com


Thanks
Jim

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

Evaluation Downloads - http://keyoti.com/products
-your feedback is helpful to other users, thank you!


Jim
#8 Posted : Thursday, November 4, 2010 4:39:26 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Thanks Wolfgang, yes it does reproduce. I notice that you have the ThesaurusControl on the main form with the text box, this isn't what we intended. I suspect that the control instance isn't able to move to a new container so earily.

You have 2 options

1. Just delete ThesaurusControl from the form, and you'll find that the component "Thesaurus1" will automatically create the default ThesaurusControl itself.

2. If you want to have control over the thesaurusControl then you can by following our custom layout example in the demo project.

Do let me know if you have any questions.

Best
Jim

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

Evaluation Downloads - http://keyoti.com/products
-your feedback is helpful to other users, thank you!


whmbraun
#9 Posted : Friday, November 5, 2010 8:25:57 PM
Rank: Member

Groups: Registered

Joined: 2/1/2010
Posts: 27
Thank you Jim,

Your advice did it - at least for the demo project and I have no reason to assume it won't work in the real project but need time to try it out. Please consider this case closed unless I come back ;-)

Wolfgang
Wolfgang
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.