Forum > General

Writer.WriteDescendent SIGSEGV error on calling CreateLFMFile

(1/3) > >>

matthius:
Hello !

I want to create a LFM file from a registered form TF_FormDico.

But there is a SIGSEGV error on Writer.WriteDescendenton calling CreateLFMFile.

What can i do ?

speter:
What can you do?

Easy, provide some code! :)

cheers
S.

matthius:
Here it is :


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---function fb_CreateForms ( var amif_Init : TIniFile; const as_destination : String ) : Boolean;var li_i : Integer;    LFileLFM : TFileStream;    aform : TF_XMLForm;    aformdico : TF_Formdico;Begin  FreeAndNil(gxdo_FichierXML);  if fb_CreateProject ( amif_Init, Application )  and fb_LoadXMLFile ( gxdo_FichierXML, fs_getLeonDir + gs_ProjectFile ) Then    Begin      Result := True;      // La fenêtre n'est peut-être pas encore complètement créée      gchar_DecimalSeparator := ',' ;      DecimalSeparator := gchar_DecimalSeparator ;      for li_i:=0 to High(ga_Functions) do       with ga_Functions [ li_i ] do        Begin         aform:=fxf_ExecuteAFonction ( li_i, true        );         aformdico := TF_FormDico.Create(Application);         aform.p_exchangeSources(aformdico);         if Assigned(aform)          Then           try             LFileLFM := TFileStream.Create(as_destination+Clep+'.lfm',fmCreate);             CreateLFMFile(aformdico,LFileLFM);           finally            LFileLFM.Destroy;            aform.Destroy;            aformdico.Destroy;           end;        end;    End   Else    Result := False;  end;  
The source is here :
https://sourceforge.net/p/xml-frames-vrad-lazarus/code/ci/default/tree/XMLToLFM/u_createproject.pas
https://sourceforge.net/p/xml-frames-vrad-lazarus/code/ci/8a78bcb3267b78a2a4b71e99bcb129c9505b3345/tree/demos/weo_firebird/builder.lpi

jamie:
maybe what you want is to use a TApplicationProperties, its on the additional tab..

with that you can specify the properties to save or load and the file to write or read it to..

Also on the MISC tab you have TXMLPropStorage that can do the same..

matthius:
I want to create a lfm file with every porperties saved. I do not want to select some properties because there are a lot to save.

What is the method which save properties on TApplicationProperties ?

Navigation

[0] Message Index

[#] Next page

Go to full version