Jump to content

Stano

Members
  • Content Count

    897
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Stano

  1. Stano

    Magic numbers (1)

    begin ... const MaxInfo = 3; var FInfo: AnsiString; for var I := 0 to MaxInfo do It bothers a little.
  2. Stano

    Magic numbers (1)

    Great.
  3. Stano

    Printing in Dark Mode????

    I use two ways: Text - I will copy it to another application. Text editor, Excel, Word ... The reason for Word is the fact that I have a line length of 120 characters. This will fit in one line in Word. When I copy a block, I lose the line numbering. That usually doesn't matter Screenshot - I will edit the given image (negative). I'm not used to printing from the IDE. It kind of doesn't suit me.
  4. Stano

    Got to last page of forum item ?

    I agree and join
  5. Stano

    Loss of Datasouce??

    I think of only one possibility. The DataSource has been physically deleted or relocated. Which is basically the same.
  6. Stano

    Move a Function or Procedure to a Unit??

    I do not agree. The reasons were written by Anders Meland. Read them a few times. This section is not designed correctly. SendAPMsg.SQL.Text := 'select s.*, j.JobNo, j.CustomerRef, j.ConsumerName, j.ConsumerPhoneNo, j.ConsumerEmail, j.Manufacturer, j.Model, j.ESN, j.ConsumerName, c.Name,'; SendAPMsg.SQL.Text := SendAPMsg.SQL.Text + 'c.ContactName, c.ServiceEmail, c.ServiceEmailName, c.CCEmailAddress, c.SvcContactName from APJobTickets s, JobTickets j, Company c'; SendAPMsg.SQL.Text := SendAPMsg.SQL.Text + 'where (j.buscode = :BusCode) and (j.JobNo = s.JobNo) and (c.BusCode = j.BusCode) and ((Current_Date - Cast(s.DateSent as Date)) >= :iAPUpdateDays) and (Trim(BOTH '' '' from j.ConsumerEmail) <> '''')'; SendAPMsg.SQL.Text := SendAPMsg.SQL.Text + 'order by s.JobNo'; Be aware that after each event SendAPMsg.SQL.Text := SendAPMsg.SQL.Text + something the correctness of SQL.Text is always evaluated. Compose the Text correctly first and assign it entirely to SendAPMsg.SQL.Text. If you do it right, the whole SQL.Text will be nicely readable. Now it's a cluster of some letters. Remember to have the right line length. They must be fully visible. I have 120 characters
  7. I have it this way (only for VCL). In the manner of Attila Kovacs. I only hide the main form by placing it off the screen. procedure NewForm(ATypeForms: TTypeForm); const Position = 200; var BasalFormClass: TBasalFormClass; LeftMainForm, TopMainForm: Integer; BasFrm: TBasalForm; begin ServeMainForm(LeftMainForm, TopMainForm); BasalFormClass := GetForm(ATypeForms); try BasFrm := BasalFormClass.CreateBasalForm(nil); BasFrm.Position := poDesigned; SupObjJson.ReadForm(BasFrm); BasFrm.ShowModal; finally if (oGlobVar.ActualForm = Application.MainForm) then begin if (LeftMainForm < 0) then begin LeftMainForm := Position; TopMainForm := Position; Application.MainForm.Left := LeftMainForm; Application.MainForm.Top := TopMainForm; end; end; end; end;
  8. Stano

    Code feedback

    I can't move on with my problem. So I adjusted one unit as part of the relaxation. I used automatic text formatting I inserted blank lines to increase readability I did not deal with unnecessary and missing begin-end pairs I personally use a 120-character line. I didn't apply it here. In Word, it fits on one side. The number of rows has increased, which I do not consider to be a mistake. rumengut.pas
  9. Stano

    Code feedback

    Such a small insignificant thing. Typical for me. I only meant formatting/refactoring published files.
  10. Stano

    Code feedback

    But that was after my answer I already mentioned here that I am not a programmer. I'm just playing with him
  11. Stano

    Code feedback

    These two files.
  12. Stano

    Code feedback

    I think that the actual modification of the code into a readable form is max for one day.
  13. Stano

    Code feedback

    I don't have to judge it. Out of curiosity, I looked at it. So fast. Nobody will go with your text formatting. It can't be read😤 Declaring variables, given their huge number, I would put in a separate unit (Classes?) You are initializing variables. It should be a separate function. In your case, in a separate unit. You must clear that code first.
  14. Stano

    Mouse busy in IDE

    Sometimes the IDE runs twice. I do not know why. In this case, you cannot work. You need to check this in the task manager.
  15. Stano

    search string word by word in table field

    Probably (no one) understands your question.
  16. Stano

    A way to collapse Defines in the IDE??

    Try running the unit through Pascal Analyzer Lite. It is quite likely that he will explain something to you.
  17. Stano

    WebView2 synchronious calls

    The modal form can also be off-screen. Form.Height := 1; Form.Widht := 1; Form.Top := -100; Form.Left := -100; I even use it. The reason is its unwanted rendering and flickering.
  18. I read a book for beginners. There it was. I mean * .dpr. A search in the menu probably followed. D7
  19. Project JasotSVB.exe raised exception class EIBNativeException with message '[FireDAC][Phys][FB]Unable to complete network request to host "xnet://Global\Local\FIREBIRD".'. The internet didn't help me. The paths are right. I shut down the server. FB ver 3.0.7. My program settings: dtmdBasic.fdfbdrlnkFoc.VendorHome := ''; dtmdBasic.fdfbdrlnkFoc.VendorLib := ''; dtmdBasic.fdfbdrlnkFoc.VendorLib := VendorDir; dtmdBasic.fdfbdrlnkFoc.Embedded := FCertificate.IsEmbedded; // True Connection := dtmdBasic.conFB; Connection.Connected := False; Connection.LoginPrompt := False; Connection.Params.Add('CharacterSet = csWin1250'); Connection.Params.Database := FBasicDir.UserDataDir + FFileName; Connection.Params.DriverID := 'FB'; Connection.Params.Database := 'Password = masterkey'; Connection.Params.Add('Port = 3050'); Connection.Params.Add('Protocol = ipLocal'); Connection.Params.UserName := 'SYSDBA'; I'm putting it here because FireDAC.
  20. Why? It works with them.
  21. There must be: ... \ plugins \ engine12.dll
  22. I have to run the program as an administrator.
  23. Based on your mention, I'm trying AkelPad. I can't activate any plugin. The list is empty. You are in: c: \ Program Files (x86) \ AkelPad \ AkelFiles \ Plugs \ Well thank you.
  24. Stano

    FB3.0 SQL

    Or Five methods converting rows to columns.txt
×