Page 1 of 1

SynGen Access Violation Error

Posted: 12 Sep 2009 20:43
by Yakumo500
Hi,

I have a problem with the SynGen.
I compiled it with Delphi 2009 but if i try to generate the highlighter in the demo directory Delphi shows an access violation error.

Can somebody send me a SynGen.exe that works?

Re: SynGen Access Violation Error

Posted: 13 Sep 2009 12:01
by Yakumo500
I found the error.

File: SynGenUnit.pas
Line: 563

Replace "Lex.Origin := Stream.Memory;" with "Lex.Origin := PWideChar(String(PAnsiChar(Stream.Memory)));"
and compile.

Now it should work.

Re: SynGen Access Violation Error

Posted: 13 Sep 2009 17:46
by Maël
Do you use Unicode SynEdit?
There is no such line in the Unicode version of SynGenUnit.pas.

Use Unicode SynEdit instead. Just making something compile or casting is not enough, it merely hides the errors.

Re: SynGen Access Violation Error

Posted: 14 Sep 2009 21:56
by Yakumo500
What?

i downloaded it on this site: http://mh-nexus.de/en/unisynedit.php

Is this a wrong component?

Re: SynGen Access Violation Error

Posted: 14 Sep 2009 23:22
by Maël
Hm, you are right the SynGen part seems to be from the Ansi version.

I'll upload the package again.

Re: SynGen Access Violation Error

Posted: 14 Sep 2009 23:49
by Maël
Ok I updated the ZIP-package.