diff --git a/designer/gettslediterstart.tsf b/designer/gettsleditorstart.tsf similarity index 98% rename from designer/gettslediterstart.tsf rename to designer/gettsleditorstart.tsf index 3b52aec..3125a3f 100644 --- a/designer/gettslediterstart.tsf +++ b/designer/gettsleditorstart.tsf @@ -86,11 +86,11 @@ begin g_dotsavehistory := true; end app := initializeapplication(); -app.createform(class(TRunEditerForm),fm); +app.createform(class(TRunEditorForm),fm); fm.OpenAndGotoFileByName(ops); fm.show(); app.run(); -type TRunEditerForm = class(TEditerForm) +type TRunEditorForm = class(TEditorForm) function Create(AOwner);override; begin inherited; diff --git a/designer/tediterform.tsf b/designer/teditorform.tsf similarity index 99% rename from designer/tediterform.tsf rename to designer/teditorform.tsf index 773f015..e597893 100644 --- a/designer/tediterform.tsf +++ b/designer/teditorform.tsf @@ -1,4 +1,4 @@ -type TEditerForm = class(TVCform) //编辑器主窗口 +type teditorform = class(TVCform) //编辑器主窗口 uses utslvclauxiliary,tslvcl,UTslSynMemo,UtslCodeEditor; function WMACTIVATE(o,e):WM_ACTIVATE;override; //激活 begin diff --git a/exec_tsl/tsleditor.tsl b/exec_tsl/tsleditor.tsl index af87333..919e016 100644 --- a/exec_tsl/tsleditor.tsl +++ b/exec_tsl/tsleditor.tsl @@ -1,3 +1,3 @@ //tsl代码编辑器-天软-ljj //20201019 -return GetTslEditerStart(); +return gettsleditorstart(); diff --git a/funcext/tvclib/tslvcl.tsf b/funcext/tvclib/tslvcl.tsf index d3cd916..7302181 100644 --- a/funcext/tvclib/tslvcl.tsf +++ b/funcext/tvclib/tslvcl.tsf @@ -4671,9 +4671,10 @@ type TApplicationProperties=class(TComponent) FTrayData := new TNOTIFYICONDATAA(); end published - property TrayMenu:tpopupmenu read FPopupMenu write SetPopupMenu; - property TrayIcon:icondata read FTrayIcon write FTrayIcon; - property ShowTray:bool read FShowTray write SetShowTray; + //屏蔽避免错误 + //property TrayMenu:tpopupmenu read FPopupMenu write SetPopupMenu; + //property TrayIcon:icondata read FTrayIcon write FTrayIcon; + //property ShowTray:bool read FShowTray write SetShowTray; end type TClipBoard = class(TcustomClipBoard) @@ -5761,17 +5762,32 @@ type Ttfm2Component = class(TTmfParser) Loadinherited(owner); //导入 end private - function hastfmfile(phs,cn); + function hastfmfile(phs,o,cn); begin for i,v in phs do begin - pi := v+cn+".tfm"; - if fileexists("",pi) then + ph := v+cn+".tfm"; + if fileexists("",ph) then begin - return true; + size := filesize("",ph); + if readFile(rwraw(),"",ph,0,size,data)=1 then + begin + LoadFromTfmScript(o,data); + return true; + end end end end + function hastfmresource(o,cn); + begin + global g_w_tfm_resource; + data := g_w_tfm_resource[cn+".tfm"]; + if data then + begin + LoadFromTfmScript(o,data); + return true; + end + end function Loadtfmtoform(o,phs,cn); begin for i,v in phs do @@ -5796,17 +5812,14 @@ type Ttfm2Component = class(TTmfParser) o2 := o; phs := static GetSourceDirs(); objs := array(); - fssourdirs := phs; + //fssourdirs := phs; while true do begin ci := o2.classinfo(); cn := ci["classname"]; if cn="tdcreateform" or cn="tdcreatepanel" then return ; - if hastfmfile(phs,cn) then - begin - Loadtfmtoform(o,phs,cn); //从 o2 改为o - return ; - end + if hastfmresource(o,cn) then return ; + if hastfmfile(phs,o,cn) then return ; ic := ci["inherited"][0]; if ic then o2 := findclass(ic,o2); @@ -6508,6 +6521,19 @@ end /////////////////////////初始化//////////////////////////////////// function initallib(); begin + global g_w_tfm_resource; + g_w_tfm_resource := array(); + try + getglobalcache("@@tsl-resource@@",rs); + for i,v in rs do + begin + if ifstring(i) and ifstring(v) then + begin + g_w_tfm_resource[lowercase(i)] := v; + end + end + except + end class(tUIglobalData).uisetdata("G_F_CONTROL_IS_CUSTOMPAINT",thisfunction(controlisCustomPaint)); class(tUIglobalData).uisetdata("G_F_TWIN_PROC_",thisfunction(_twinproc_)); class(tUIglobalData).uisetdata("G_F_TIME_PROC_",thisfunction(_timeproc_));