> > I think I found the problem:
> >
> > 1) at SynUniHighlighter.pas, the
> >
> > procedure Register;
> > begin
> > RegisterComponents('SynEdit', [TSynUniSyn]); end;
> >
> > Should be removed (was added by Tom). The component registration
> > action is repeated at SynUniReg.pas in a more correct way:
> >
> > procedure Register;
> > begin
> > RegisterComponents( SYNS_ComponentsPage, [TSynUniSyn] );
> > RegisterComponentEditor(TSynUniSyn, TSynUniEditor); end;
>
> Where is this TSynUniEditor?
If that one is missing at the Lazarus port, the respective line should be
commented out
> > As you see, here it uses the SYNS_ComponentsPage constant
> of SynEdit
> > for
> the
> > palette name. Users should open up and register
> SynUniReg.pas instead
> > of SynUniHighlighter.pas
> >
> > 2) at SynUniHighlighter.pas, Tom didn't need to do all
> those changes,
> > he could have used {$MODE DELPHI} instead. I suggest the original
> > SynUniHighlighter.pas is taken (it's the same version from
> which Tom
> > made the Lazarus port) from
> > http://www.delphist.com/UniHighlighter.html and
> used
> > with {$MODE DELPHI}. In fact there's high chance all the stuff Tom
> couldn't
> > port (e.g. the designer) could be ported just by adding
> {$MODE DELPHI}
> > in the sources of that UniHighlighter version (don't get newer
> > UniHighlighter from UniHighlighter.com, don't think it works with
> > SynEdit1.1, but only
> with
> > 2.x)
> >
> > 3) the fix to the extisting SynUniHighlighter.pas that Tom
> made must
> > be
> the
> > following (haven't tested it). Search for //Birb below (2 fixes):
> >
> > function TNumberSymbols.GetToken(parser:TSynUniSyn; var
> > tkSynSymbol1:TSynSymbol): boolean;
> > begin
> > repeat
> > Inc(Parser.Run);
> > until not (parser.fLine[parser.Run] in ['0'..'9']); if
> > parser.fLine[parser.Run] in parser.fCurrentRule.fTermSymbols then
> > begin
> > Result:=True;
> > tkSynSymbol1:=self.tkSynSymbol; //Birb: Tom had renamed
> the method
> > parameter in the signature to tkSynSymbol1, but forgot to
> rename it in
> > the code too end else
> > Result:=false;
> > end;
> >
> > function TDefaultTermSymbols.GetToken(parser: TSynUniSyn;var
> > tkSynSymbol1:TSynSymbol): boolean;
> > begin
> > if parser.fLine[parser.Run]<>#0 then
> > Inc(parser.Run);
> > tkSynSymbol1:=self.tkSynSymbol; //Birb: Tom had renamed
> the method
> > parameter in the signature to tkSynSymbol1, but forgot to
> rename it in
> > the code too
> > Result:=True;
> > end;
> >
> > This bug would have been avoided if Tom did use {$MODE
> DELPHI} so that
> > FPC wouldn't complain of the tkSynSymbol method parameter as a
> > duplicate (the respective classes had a field with the same
> name which
> > Delphi allows, but FPC doesn't seem to if {$MODE DELPHI} isn't used)
> >
> > *** Please try this fix (will tell my colleagues to try it too) and
> > then somebody add this to Lazarus sourcebase. Would be glad
> if someone
> > lets me know when new Lazarus with this fix is arround.
> >
> > * Will also tell my colleagues to try porting all the unihighlighter
> distro
> > from http://www.delphist.com/UniHighlighter.html using Delphi
> compatibility
> > mode of FPC and let you know if they do it successfully (don't have
> > time
> at
> > the moment to do it myself). If they make it we can put that one in
> Lazarus
> > instead of Tom's partial port I suppose, since FPC can mix Pascal
> > files of Delphi and non-Delphi mode OK.
>
> Will you create a patch?
Still waiting to see if others can try it and see if it works (I only
compared the sources with WinDiff, haven't got time currently to test it)
Not sure how to make a patch btw, is there some builtin tool at lazarus to
make Diffs or similar? Or does one use TortoiseCVS menu to do the Diff?
----------------
George Birbilis ([EMAIL PROTECTED])
Microsoft MVP J# for 2004-2006
Borland "Spirit of Delphi"
* QuickTime, QTVR, ActiveX, VCL, .NET
http://www.kagi.com/birbilis
* Robotics
http://www.mech.upatras.gr/~Robotics
http://www.mech.upatras.gr/~robgroup
_____
avast! Antivirus <http://www.avast.com> : Outbound message clean.
Virus Database (VPS): 0629-2, 21/07/2006
Tested on: 22/7/2006 2:27:58 p?
avast! - copyright (c) 1988-2006 ALWIL Software.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives