I'm not sure it will be that helpful because it's pretty integrated with a
third party webservice that returns a list of incorrect words, the position
of these words, and suggested changes.

I iterate through each incorrect word and prompt the user.  If they want to
replace the word here's what the code looks like:

           var startWordIndex:int; // where incorrect word began in
original string
           var endWordIndex:int   // where incorrect word ended in original
string
           startWordIndex = indexOffset + wordPositionArray[
currentWordObject.OffsetInText];  // the important thing is that we know the
position of the incorrect word.
           endWordIndex = startWordIndex +
currentWordObject.MistakenWord.length
           currentBoxObject.replaceText(startWordIndex,endWordIndex,
wordBox.text); // currentBoxObject:UITextField // actually, it looks like
this will handle the formating, if not save formating before this line and
set it after using TextFormat
           indexOffset +=  wordBox.text.length - (endWordIndex -
startWordIndex); // when we change the text, previous saved indexes became
invalid, save relative change here
           promptForNextWord();
}

- Dan

On 3/29/07, jmfillman <[EMAIL PROTECTED]> wrote:

  Daniel, can you post an example of how you've done this?

Reply via email to