设计器

tsl语法修正,注册控件
This commit is contained in:
JianjunLiu 2023-05-23 15:54:13 +08:00
parent 7f8ea00181
commit 2907d93dbf
6 changed files with 13 additions and 1 deletions

Binary file not shown.

View File

@ -2040,6 +2040,8 @@ begin
begin begin
dir := static getdesignerpath()+"dcmps"+ioFileseparator(); dir := static getdesignerpath()+"dcmps"+ioFileseparator();
nf := dir+kn+".tsf"; nf := dir+kn+".tsf";
sysclearfunc(kn,"system");
sysclearfunc(n,"system");
filedelete("",nf); filedelete("",nf);
end end
end end

View File

@ -657,6 +657,11 @@ type TTslSynHighLighter = class(TSynHighLighter)
isjsfh := true; isjsfh := true;
if ttk then if ttk then
SetJsToken(tokens,ttk,idx-1); SetJsToken(tokens,ttk,idx-1);
end else
if vi='"' or vi="'" then
begin
if ttk then
SetJsToken(tokens,ttk,idx-1);
end end
if vi="[" then if vi="[" then
begin begin
@ -761,7 +766,7 @@ type TTslSynHighLighter = class(TSynHighLighter)
end else end else
if {pos(vi,jsfh)}isjsfh then if {pos(vi,jsfh)}isjsfh then
begin begin
if vi<>" " or vi="\t" then if not(vi=" " or vi="\t") then
begin begin
td := SetJsToken(tokens,vi,idx); td := SetJsToken(tokens,vi,idx);
if td and hightercolor then if td and hightercolor then

View File

@ -47,7 +47,11 @@ type TDComponent = class()
if (v is class(TDComponent) ) then if (v is class(TDComponent) ) then
begin begin
o := createobject(v); o := createobject(v);
try
n := o.dclassname(); n := o.dclassname();
except
continue;
end
if n and ifstring(n) then if n and ifstring(n) then
begin begin
n := lowercase(n); n := lowercase(n);
@ -62,6 +66,7 @@ type TDComponent = class()
begin begin
if not fdcomponentobjectsext then return 0; if not fdcomponentobjectsext then return 0;
reindex(fdcomponentobjectsext,array(n:nil)); reindex(fdcomponentobjectsext,array(n:nil));
reindex(fdcomponentobjects,array(n:nil));
end end
private private
fisiherted; fisiherted;

Binary file not shown.

Binary file not shown.