Suiun / cnpack

Automatically exported from code.google.com/p/cnpack
0 stars 0 forks source link

[PATCH] paslex failing during initialization #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
For some reason, paslex was failing during startup.  However, the attached 
patch, which is completely innocuous, and will affect nobody else in any way, 
fixes my problem (some character set encoding issue).  The patch was made off 
the current (627) revision.   I can also confirm now that mPasLex.pas works for 
latest D2010.

Original issue reported on code.google.com by caleb.ha...@gmail.com on 16 Jul 2010 at 1:17

GoogleCodeExporter commented 8 years ago
A new patch file, because the $I include for CnWizards.inc is also not required 
in this file.  (I am using paslex in another application).

Original comment by caleb.ha...@gmail.com on 16 Jul 2010 at 1:30

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks. Could you tell us what this patch does?
In what case paslex fail during startup. I'm not clear about this issue. ;-(

Original comment by liuxiaos...@gmail.com on 19 Jul 2010 at 12:08

GoogleCodeExporter commented 8 years ago
And, truely innocuous and I can use this patch.

Original comment by liuxiaos...@gmail.com on 19 Jul 2010 at 12:11

GoogleCodeExporter commented 8 years ago
The patch just moves the bit of code using the local integer variable "J" into 
the case section where J" is used.   On my system, there were some values of 
string[I] where I>128 where the line "AnsiChar(UpperCase(string(I))[1])" would 
cause an Access Violation.  I didn't dig any deeper into it, I don't have the 
time now.  But the patch prevents the error.

Original comment by caleb.ha...@gmail.com on 19 Jul 2010 at 12:44

GoogleCodeExporter commented 8 years ago
Thanks for committing the patch.  One question: the line:

{$I CnWizards.inc}

is still in mPasLex.pas.  It is not required to be there by any code.   Could 
it be removed?  I am using mPasLex.pas in a separate app, and I would prefer to 
use exactly the same version as the CnPack version?

Original comment by caleb.ha...@gmail.com on 19 Jul 2010 at 12:50

GoogleCodeExporter commented 8 years ago
This including is mainly used to disable compiler warnings in ALL Delphi 
versions. For our product it's not proper to remove it. Many 3rd units also 
include this file.

Could you manually remove only this line?

Original comment by liuxiaos...@gmail.com on 20 Jul 2010 at 12:55

GoogleCodeExporter commented 8 years ago
Ok, that's fine.

Original comment by caleb.ha...@gmail.com on 20 Jul 2010 at 2:07

GoogleCodeExporter commented 8 years ago

Original comment by liuxiaos...@gmail.com on 6 Nov 2012 at 2:33