EControl Ltd. Forum Index EControl Ltd.
VCL libraries and software support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HTML with Scripts Parser

 
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor
View previous topic :: View next topic  
Author Message
keithml



Joined: 25 Jul 2006
Posts: 12
Location: Florida

PostPosted: Tue Jul 25, 2006 1:19 am    Post subject: HTML with Scripts Parser Reply with quote

It has been a while since I've used the control and must have forgotten something. Oddly the HTML with Scripts Parser doesn't seem to work when I use it, but the syntax highlighting works for others like Pascal and C.

Here is the code I used.

CtrlText: TSyntaxMemo;
CtrlManager: TSyntaxManager;

CtrlManager.LoadFromFile(gGetProgramDir+'LexLib.LXL');

CtrlText.LoadFromFile(FileName);
CtrlText.SyntaxAnalyzer := CtrlManager.AnalyzerForFile(FileName);
CtrlManager.CurrentLexer := CtrlText.SyntaxAnalyzer;

What am I doing incorrectly?

Thanks,
Keith
Back to top
View user's profile Send private message Visit poster's website
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Tue Jul 25, 2006 7:05 am    Post subject: Reply with quote

Hi Keith,

Is any highlighting in the editor after executing your sample code?


Michael.
Back to top
View user's profile Send private message Send e-mail
keithml



Joined: 25 Jul 2006
Posts: 12
Location: Florida

PostPosted: Tue Jul 25, 2006 12:52 pm    Post subject: Reply with quote

It has no highlighting at all for the HTML parser, but works for the Pascal and C++ I tried.

Keith
Back to top
View user's profile Send private message Visit poster's website
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Wed Jul 26, 2006 9:03 am    Post subject: Reply with quote

Possible reason is a bug:

See first topic: http://www.econtrol.ru/forum/viewtopic.php?t=14

fixing (ecSyntAnal.pas):

Code:
procedure TSyntAnalyzer.Loaded;
begin
  inherited;
...
  CompileGramma;
  DetectBlockSeparate;// <== fixing
end;


Michael.
Back to top
View user's profile Send private message Send e-mail
keithml



Joined: 25 Jul 2006
Posts: 12
Location: Florida

PostPosted: Wed Jul 26, 2006 1:48 pm    Post subject: Reply with quote

I used both bug fixes in the thread specified. Neither solved the problem. I have uploaded a quick example project, just in case that helps. I have left the compiled executable intact so you can see what happens before you recompile the project as well.

Example Project URL:

www.onecatweb.com/downloads/EControl.zip

Thanks,
Keith
Back to top
View user's profile Send private message Visit poster's website
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Wed Jul 26, 2006 8:16 pm    Post subject: Reply with quote

Hello Keith,

This bug is fixed.
Please, wait for new update (v 2.25). There are many changes in code.

Michael.
Back to top
View user's profile Send private message Send e-mail
keithml



Joined: 25 Jul 2006
Posts: 12
Location: Florida

PostPosted: Thu Jul 27, 2006 12:32 am    Post subject: Reply with quote

THANKS!

Keith
Back to top
View user's profile Send private message Visit poster's website
keithml



Joined: 25 Jul 2006
Posts: 12
Location: Florida

PostPosted: Mon Jul 31, 2006 4:50 pm    Post subject: Reply with quote

HTML still doesn't load correctly in 2.25. It remains plain text. Any other suggestions?

Keith
Back to top
View user's profile Send private message Visit poster's website
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Mon Jul 31, 2006 6:57 pm    Post subject: Reply with quote

Take LexLib.lxl from new update. The problem in previous version was in incorrect
saving lexer references. They was with the owner name (for example "SyntEditMain.SyntAnalyzer9").
In new update references are saved without owner name (i.e. "SyntAnalyzer9").

So you should take LexLib.lxl from latest update or open old LexLib.lxl and save it.

Michael.
Back to top
View user's profile Send private message Send e-mail
keithml



Joined: 25 Jul 2006
Posts: 12
Location: Florida

PostPosted: Tue Aug 01, 2006 1:36 pm    Post subject: Reply with quote

That was it.

Thanks!
Keith
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group