Board index » cppbuilder » VCI - VisualSpeller Trouble (BCB1)

VCI - VisualSpeller Trouble (BCB1)

Hi everyone,
I am having trouble getting VisualSpeller to work properly in BCB 1.0. I
have attached the following code to a button.  It spell checks the text
in a memo field the first time I click on the button, but on the second
time, I get "Attempting spellcheck with no text loaded".  The help file
has errors in the sample code.  Does anyone have a working example?  Or,
maybe a correction to my code?

void __fastcall TForm1::SpellBtnClick(TObject *Sender)
{
  int Return = 0;
  VSpell->AutoPopup = False;
  VSpell->CheckText = Memo1->Text;
  Return = VSpell->ResultCode;
  do
    {
      if(Return == VSR_WORD_MISSPELLED || Return == VSR_IGNORE_REPLACE)
        {
          VSpell->PopupWordMisspelled = 1;
          Return = VSpell->ResultCode;
        }
      if(Return == VSR_CHECK_CANCELED)
           break;
      Return = VSpell->ResumeCheck;
    } while (Return < 0);
  Memo1->Text = VSpell->Text;

Quote
}

Thanks,
Robert Hunt
rh...@nass.usda.gov
 

Re:VCI - VisualSpeller Trouble (BCB1)


void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
  int Return = 0;
  VCSpeller1->AutoPopup = False;
  VCSpeller1->CheckText = Memo1->Text;
  Return = VCSpeller1->ResultCode;
  do
    {
      if(Return == VSR_WORD_MISSPELLED || Return == VSR_IGNORE_REPLACE)
        {
          VCSpeller1->PopupWordMisspelled = 1;
          Return = VCSpeller1->ResultCode;
        }
      if(Return == VSR_CHECK_CANCELED)
           break;
      Return = VCSpeller1->ResumeCheck;
    } while (Return < 0);
  Memo1->Text = VCSpeller1->Text;

Quote
}

Re:VCI - VisualSpeller Trouble (BCB1)


Your code should work i think the problem you are having is that you did not
change the name of the componet, your code says VSpell that must be the name
of the componet for it to work with that code

Re:VCI - VisualSpeller Trouble (BCB1)


yea i just tryed it also, it has bugs, it did the same thing for me, i got
it from here from robert also.
it needs a few error handles and code to tell it what you want it to check.

Re:VCI - VisualSpeller Trouble (BCB1)


and update it works correctly from the executable file,just not from bcb
ide.

Other Threads