Re: patch: SmartQuotesEnable preference item


Subject: Re: patch: SmartQuotesEnable preference item
From: Thomas Fletcher (thomasf@qnx.com)
Date: Wed Jul 19 2000 - 06:46:24 CDT


Bill ... you rock. Looking forward to the generalized
mechanism ... and as someone pointed out this might
even see some immediate use for WordCount (though
maybe not because you would have to handle deleted
blocks and the like).

Thomas

On Tue, 18 Jul 2000, WJCarpenter wrote:

> tf> In short it isn't just about re-maping smart quotes, but also
> tf> potentially about doing on the fly spell _correction_ and other
> tf> actions that require us to to work as the user types. I think
> tf> that putting this code into remapGlyphs is the wrong place to put
> tf> it. Instead we should look to see where the squiggle code is and
> tf> if you really want to, generalize that so that it can do
> tf> squiggles, smart quote substitution, auto typo correction (ie teh
> tf> --> the automatically), automatic outline collapsing and the like.
> tf> That would seem to me to be a much better way to spend your
> tf> development time.
>
> Despite my earlier sketch of an example implementation based on
> remapGlyphs(), I actually am in complete agreement with what you said
> right there. I even started down a path of implementing it last
> weekend.
>
> Is the person who implemented the background spell checking still
> around? Well, in any case, I've been through that code recently, and
> I'd have to say it is a darned decent implementation.
>
> A heartbeat timer fires every 100 ms, at which point a FIFO queue of
> blocks-in-need-of-spell-checking is looked at. The block at the head
> of the queue gets spell-checked (with all that attendant squiggle
> stuff) and then removed from the queue. Various other parts of Abi
> just cause newly added blocks (from typing, from pasting, etc) to be
> added to the queue. For me, the user experience is quite nice. I
> don't know how 100 ms was computed, but it seems to work out right.
> When you type a misspelled word and move on to the next word, you have
> the illusion that Abi is doing "check the word I just typed", but it
> is really doing "queue for spell checking the block I just finished".
>
> Last weekend, I began the work of generalizing this mechanism (with
> the view of using it for smart quotes somehow). To maximize current
> confusion in the interests of minimizing long-term confusion (among
> developers), there is a massive, selective variable and function
> renaming to reflect the concept of "background checks" rather than
> just "spell checks". Spell checking then just becomes one instance of
> a type of background check for a block. The idea is that a block can
> be queued for one or more reasons. When it gets to the head of the
> queue, the list of "reasons why it was queued" is examined and a
> handler is called for each.
>
> Because of the tedium of renaming everything and sorting out the
> spelling-specific stuff from the general mechanism, and because of
> [lame excuses], I haven't yet finished this reworking. I intend to
> finish it within the next few days and submit a patch for it before
> later layering any smart quote stuff on top of it. (It's really easy
> to test whether I've broken background spell checking! :-)
>
> More good news: it's all XP code that changes and is actually limited
> to a small handful of files.
> --
> bill@carpenter.ORG (WJCarpenter) PGP 0x91865119
> 38 95 1B 69 C9 C6 3D 25 73 46 32 04 69 D6 ED F3
>
>

-------------------------------------------------------------
Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf



This archive was generated by hypermail 2b25 : Wed Jul 19 2000 - 06:45:53 CDT