Hello Martin.

In tmainfo I want to add a SyntaxDef menu-item.
OnExecute will call a openfile dialog to choose the syntaxdef file.

I try with this procedure without succes:

procedure tmainfo.LoadSyntaxDef(const sender: TObject);
var
int1 : integer;
begin
  openfile.controller.lastdir := 
IncludeTrailingBackslash(ExtractFilePath(ParamStr(0))) + '/syntaxdefs';

if openfile.execute = mr_ok then
begin
    with sourcefo.syntaxpainter do begin
      sourcefo.syntaxpainter.clear;
     try
      for int1:= 0 to sourcefo.count - 1 do begin
       sourcefo.items[int1].edit.setsyntaxdef(openfile.controller.filename);
      end;
     except
      application.handleexception;
     end;
    end;
   for int1:= 0 to sourcefo.count - 1 do begin
    sourcefo.items[int1].updatestatvalues;
   end;
   end;
end;


Sadly, the choosen syntaxdef is not loaded.

Do you have a idea how to code it ?

Thanks.

Fre;D

<http://sites.google.com/site/fiensprototyping/home>
------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to