[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Addict 3 Problems



> Many thanks for the Addict 3 beta - it has some great new features!

Thanks  :-)

> I find, however, that upgrading from Addict 2 is not a straightforward
> process - as you have changed most of the API property and method
> names/parameters, it would be useful to have a migration guide.
> That said, I have completed the migration of our apps from Addict 2 to
Addict
> 3 and find that:

It would be nice if you (and other users on this list) who have had a bit of
a problem getting a v2 function out of v3 would make them all known to us (I
realize that's what you're doing now).  This way we can start a migration
FAQ with some of the appropriate responses...

> 1. Addict 2 had the ability to check a defined range of a (RichEdit)
> control, via the CheckCustomRichEditPos() method, but this
> appears no longer to be available in Addict 3 via the CheckWinControl()
method.
>
> Basically, if a spell-check is started in the middle of a control's
contents
> (but no text is selected) I want first to check from the SelStart position
> to the end, and then to check from the beginning of the control's contents
> to the orignal start position. This latter part of the check is no longer
> possible with Addict 3. I guess I can achieve this by resetting the
> control's selection to be from 0 to the inital position anf then calling
> CheckWinControl(...,ctSelected), but thjis can cause a momentary flicker
due
> to the contrl's selection highlight showing.
>
> Is there a better workaround for this?

Unfortunately, at present there is not.  Though there will be mighty quick.
I was somewhat dismayed to see that this wasn't available.  You can setup
the parser to do it like so:

      Parser1 := TWinAPIControlParser.Create;
	Parser1.Initialize(Memo1);
	Parser1.SetPosition( XStart, YStart, ptCurrent );
	Parser1.SetPosition( XEnd, YEnd, ptEnd );

But Addict overrides it when starting the spelling check.  I'll make sure
that there's a ctCurrent option added to the CheckType params that allows
this behavior for the next beta.

For now, your workaround is the best solution (without actually running the
spelling check yourself).

> 2. When I use the workaround in 1., Addict 3 reports a different
> word count
> depending on where in the control the spell check is started. For
> instance,
> if I start the check immediately before a space character I get one count,
> while if I then check again from just after the space character I get a
> different count. These two counts can differ by up to 7!

Keep in mind that Addict's word-count is truely just the number of words
that it has checked.  Not necessarily that number of words in the document.
If you give focus to another form, for instance, addict will resynchronize
with the edit control based upon current cursor position.

If you're still convinced that this is an Addict issue, then please, try to
be more specific.  What is the exact text your are checking, where exactly
are you checking it from, and what code are you using to do it?  Make sure
that the text doesn't have any errors in it so the count isn't thrown off by
re-checking insert words, etc....

> 3. I notice that the CloseSpellDialog method only closes the dialog if
> CloseDialog = True. I would have thought that a call to CloseSpellDialog
> would irrespective force a close. No big deal, I guess, but a
> mention in the help about this would be useful.

This is the intended behavior  :-)
Addict internally calls CloseSpellDialog to shut it down... the CloseDialog
property is a simple override for that behavior to keep Addict from
automatically closing it.

If you're using this functionality, you might want to try doing a Sequence
Check instead...  Check out the demo for more details.  If there's some
reason why you can't use a sequence check, let us know as we're trying to
have the SequenceCheck mechanism take care of these situations
automatically.

> All said, it's a great upgrade and I look forward to the final release. Do
> you have any idea when that is likely to be?

If all goes well, it should be between 2-4 weeks.


Best Wishes,

Michael Novak
Addictive Software
address@hidden
http://www.addictive.net




Please visit Addict Home Site.