Recent

Author Topic: [RESOLVED] SynEdit - TSynSearchOptions not Found  (Read 186 times)

pixelink

  • Hero Member
  • *****
  • Posts: 1171
    • Pixelink Software
[RESOLVED] SynEdit - TSynSearchOptions not Found
« on: July 19, 2019, 10:31:45 pm »
Hi,

I am trying to get the Find/Replace SynEdit example on my form, but I keep getting this error.
One difference between my form and SynEdit example... is I am doing away with the FFRame and put the find Fields directly on my main form

function GetOptions:TSynSearchOptions;

err = Identifier not found


Code: Pascal  [Select]
  1.  
  2. uses
  3. LCLType, LCLIntf, Classes, SysUtils, Forms, Controls, Graphics, Dialogs,
  4.   Menus, ExtCtrls, StdCtrls, Buttons, SynEdit, PrintersDlgs, ShellApi, Clipbrd,
  5.   ActnList, SourcePrinter, LConvEncoding,StdActns,FileUtil, SynHighlighterPas, ComCtrls
  6.  
  7. private
  8.     FBackwards                    :Boolean;
  9.     FOnCloseFrame                 :TNotifyEvent;
  10.     FOnAfterSearch                :TOnAfterSearch;
  11.     FSynedit                      :TSynEdit;
  12.     FInCheckBoxChange             :Boolean;
  13.     function GetOptions           :TSynSearchOptions;  <<-- ERROR
  14.     procedure DoSearch;
  15.  
  16.  
  17.  
  18. function TForm2.GetOptions :TSynSearchOptions;
  19. begin
  20.   Result := [ssoFindContinue];
  21.   if actWholeScope.Checked then Result := [ssoEntireScope];
  22.   if actSelectOnly.Checked then Result := [ssoSelectedOnly];
  23.  
  24.   if actCaseSensitive.Checked    then Result := Result+[ssoMatchCase];
  25.   if actWholeWords.Checked       then Result := Result+[ssoWholeWord];
  26.   if FBackwards                  then Result := Result+[ssoBackwards];
  27.   if cbReplace.Checked  then begin
  28.     Result := Result+[ssoReplace];
  29.     if actReplaceAll.Checked       then Result := Result+[ssoReplaceAll];
  30.     if actPromptOnReplace.Checked  then Result := Result+[ssoPrompt];
  31.   end;
  32. end;
  33.      
  34.  
  35.  


I have gone over every part of the sample code and cannot see what I am missing.
Why am I gettings this?
« Last Edit: July 19, 2019, 10:43:24 pm by pixelink »
Can't Type - Forgetful - Had Stroke = Forgive this old man!

Pixelink Software
VB.NET 2019 • LAZ 2.02 •  Win10 • 16G RAM • Nivida GForce RTX 2060

pixelink

  • Hero Member
  • *****
  • Posts: 1171
    • Pixelink Software
Re: SynEdit - TSynSearchOptions not Found
« Reply #1 on: July 19, 2019, 10:43:10 pm »
Figured it out... I forgot the SynEditTypes uses in the FFrame
Can't Type - Forgetful - Had Stroke = Forgive this old man!

Pixelink Software
VB.NET 2019 • LAZ 2.02 •  Win10 • 16G RAM • Nivida GForce RTX 2060