Recent

Author Topic: [SOLVED] Custom form  (Read 21450 times)

dbannon

  • Hero Member
  • *****
  • Posts: 3822
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Custom form
« Reply #45 on: December 20, 2021, 12:40:25 am »
I AM STILL USING 2.0.12

But you have established that version 2.0.12 does not do what you want. Its a released and therefore frozen product, its not going to change. You need to either use a version that might do what you want or do something different.

As you mentioned earlier, its not rocket science.

Davo

EDIT: Actually, on my system, its is there on even 2.0.10 (I don't have ~12 installed). I suggest you try rebuilding your 2.0.12 with the bigide option, https://wiki.freepascal.org/Installing_Lazarus_on_Windows#Building_Lazarus clearly says -

Code: Pascal  [Select][+][-]
  1. make bigide

That being said, Juha has said, again, pretty clearly, that this area of Lazarus will work better with trunk. I would believe him ...

I have made, perhaps, 20 releases of tomboy-ng using trunk Lazarus. I have NEVER got into trouble doing so.
 
Davo
« Last Edit: December 20, 2021, 12:56:29 am by dbannon »
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

pcurtis

  • Hero Member
  • *****
  • Posts: 951
Re: Custom form
« Reply #46 on: December 20, 2021, 09:20:24 am »
I'm currently debugging the project templates code. I've nearly got what I want. I don't want to use an unofficial release. I'm not a hard core programmer, and find it hard to deal with new issues because of slight changes. I'll stick to what I know, and wait for the official release, plus while I'm delving into the IDE workings I'm learning.
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2

pcurtis

  • Hero Member
  • *****
  • Posts: 951
Re: Custom form
« Reply #47 on: December 20, 2021, 11:02:19 am »
Ok, I've done it. Just a few changes and it works for me.

idetemplateproject.pp comment out line 158

  //FileReplaceText(fn+'.lpi',Desc.FTemplate.ProjectFile,Desc.FProjectName);

frmtemplatevariables.pas

add Sysutils to uses and change

Code: Pascal  [Select][+][-]
  1. procedure TProjectVariablesForm.FormCreate(Sender: TObject);
  2. begin
  3.   if not DirectoryExists('c:\lazarus\temp') then    // <- add this
  4.     MkDir('c:\lazarus\temp');                               // <- add this
  5.   Caption := STitle;
  6.   ProjNameLabel.Caption:= SNameforProject;
  7.   DEDestDirLabel.Caption:= SCreateinDir;
  8.   PDescription.Caption:= SThisProject;
  9.   ButtonPanel1.CancelButton.Caption:= SbtnCancel;
  10.   ButtonPanel1.OKButton.Caption:= SbtnOK;
  11.   DEDestDir.Text := 'c:\lazarus\temp';    // <- add this
  12.   EProjectName.Text := 'project1';    // <- add this
  13. end;
  14.  
  15. procedure TProjectVariablesForm.ProjectVariablesFormShow(Sender: TObject);
  16. begin
  17.   SGVariables.Cells[0,0]:=SVariable;
  18.   SGVariables.Cells[1,0]:=SValue;
  19.   SGVariables.Cells[2,0]:=SDescription;
  20.   SGVariables.cells[1, 1] := 'untMain';  // <- add this
  21. end;
  22.  
« Last Edit: December 21, 2021, 01:07:55 am by pcurtis »
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2

 

TinyPortal © 2005-2018