Jump to content

Jacek Laskowski

Members
  • Content Count

    267
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Jacek Laskowski

  1. Please ask here: https://groups.google.com/g/firebird-support
  2. NetHTTPClient has one huge advantage... When working with SSL/TLS it uses the system api and you don't have to fight with openssl, certificates etc.
  3. In your class constructor, you should assign these events, something like: constructor TmyNetHTTPClient.Create() begin inherited Create; OnReceiveData := ReceiveData; OnRequestComplewted := RequestCompleted; end;
  4. Jacek Laskowski

    Problems changing database with pooled connection

    Try to use OutputDebugString() function from WinAPI and this tool for viewing output: https://docs.microsoft.com/en-us/sysinternals/downloads/debugview
  5. Jacek Laskowski

    Problems changing database with pooled connection

    Try debugging the difference in the firedac code, just before the error, how the manager's state differs?
  6. Jacek Laskowski

    FireDAC and pooling parameters

    What exactly are PoolCleanupTimeout and PoolExpireTimeout in FireDAC connection definition params? Documentation not explain these parameters. @Dmitry Arefiev ?
  7. Jacek Laskowski

    Problems changing database with pooled connection

    @Dmitry Arefiev Dmitry, please explain what you mean?
  8. I guess inside the uUtils.Http.PostIndy() method, the Request parameter is somehow casted and associated with a buffer/indicator, which is later cleaned up by another part of the code (maybe thread?)
  9. Jacek Laskowski

    livebindings without livebindings designer , code only

    I don't know the answer to the question, but it may be useful: https://github.com/malcolmgroves/FluentLiveBindings
  10. Jacek Laskowski

    Records, Generics and RTTI meets FireDAC

    @Lars Fosdal Ok, ok, I just wanted to expand the topic: FireDAC, RTTI and generics 😉
  11. Jacek Laskowski

    Records, Generics and RTTI meets FireDAC

    Look at my idea, without records, but with interfaces, SQL is generated automatically, moreover UPDATE and INSERT works 😉 https://github.com/jaclas/transfORM
  12. I need to validate an XML file that has references to XSD files, I use TXMLDocument for that. But during this validation, which is done in a thread, the MSXML bni library displays me a window asking for permission, it looks like this: The message in english is: "This page is accessing information that is not under its control. This poses a security risk. Do you want to continue?" Is it possible to confirm this question from the code level or disable the message? And I know it is hidden in the internet options of the system, but I do not have access to clients' computers and I have to bypass it in the code.
  13. Jacek Laskowski

    XMLDocument and popup windows

    The reason is in the internet settings: https://kb.froglogic.com/squish/web/troubleshoot/page-accessing-information-not-under-its-control/ When I change "Access data sources across domains" to Enable problem disappear. But how to change this or prevent from code level?
  14. Jacek Laskowski

    XMLDocument and popup windows

    Code: var lXML: IXMLDocument; begin lXML := TXMLDocument.Create(nil); lXML.ParseOptions := [poResolveExternals, poValidateOnParse]; lXML.LoadFromFile('test_.xml'); and test file for load: <?xml version="1.0" encoding="UTF-8"?> <tns:JPK xmlns:tns="http://jpk.mf.gov.pl/wzor/2017/11/13/1113/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:etd="http://crd.gov.pl/xml/schematy/dziedzinowe/mf/2016/01/25/eD/DefinicjeTypy/" xsi:schemaLocation="http://jpk.mf.gov.pl/wzor/2017/11/13/1113/ http://www.mf.gov.pl/documents/764034/6145258/Schemat_JPK_VAT%283%29_v1-1.xsd"> <tns:Naglowek> <tns:KodFormularza kodSystemowy="JPK_VAT (3)" wersjaSchemy="1-1">JPK_VAT</tns:KodFormularza> <tns:WariantFormularza>3</tns:WariantFormularza> <tns:CelZlozenia>0</tns:CelZlozenia> <tns:DataWytworzeniaJPK>2020-07-23T12:49:30.000Z</tns:DataWytworzeniaJPK> <tns:DataOd>2020-06-01</tns:DataOd> <tns:DataDo>2020-06-30</tns:DataDo> <tns:NazwaSystemu>test</tns:NazwaSystemu> </tns:Naglowek> </tns:JPK>
  15. I have been using VMware Workstation for years, the host system is Windows 10, the virtual machine works under Windows 7, where I have Delphi 10.3 installed. It always worked well. External project and library files are on a disk shared by VMware mechanism called "Shared folders", in the virtual machine they are available as a network disk, which I map to the letter D:\ A month ago I built a new computer on Ryzen, and installed Ubuntu as the host system. Under Ubuntu I installed VMware Workstation and moved a virtual machine containing Delphi from the old computer. I've converted the disk file system with projects and libraries from NTFS to Ext4 and it's also shared by "Shared folders". Everything was ok until it turned out that I couldn't make a change in Spring.inc file from Delphi level. But for example, by notepad the change was successful. I couldn't find an explanation, so I worked until now. Since yesterday I have the same problem with one of the files in my project. Trying to save (ctrl+s) changes in *.pas file ends with an error message: "Unable to rename ...\path\filename.pas to ...\path]\__history\filename.pas.~20~" and the file does not save, only a copy of it with the extension *.$$$ next to the source file is created, all this can be seen in the screenshot: It seems that the internal (Delphi) file versioning mechanism has some problem with this file. But I've been editing other files from the same project for a month now and I haven't had such problems (except for Spring.inc - outside the project). This is not a problem of permissions in the Ext4 file system, because I checked and the permissions are identical with all the project files. I also checked the file edition with notepad and rename with move with shell command "mv" - also without any problem. What can be the cause and what else can I check?
  16. Jacek Laskowski

    Unable to rename pas file to versioned ~1~ file - strange issue

    I also use relative paths in the project, but in the end each path is absolute. And probably others, like me, have some common folder with external libraries (in my case d:\work\libraries) which as a whole could be excluded and the problem would disappear. Fortunately, git can be configured so that "on the fly" it changes the end of line characters to the ones we prefer and does not treat this as changed sources, so everything works fine. Thanks to this Spring4D has a CRLF at the ends of the line.
  17. Jacek Laskowski

    Unable to rename pas file to versioned ~1~ file - strange issue

    Great @Uwe Raabe! In that case I will add one more thing I came across. Before I was touched by the problem "Unable rename ..." I was struggling with strange behavior of the environment while debugging the code. When I pressed the F7 key while standing cursor on the line with a Spring method call, IDE went to Spring4D sources and then the weird thing happened. The cursor was standing on the first line of the unit (not in the method) and the Spring file was marked by the IDE as modified (asterisk next to the name). I was looking for a long time for the reason before I came across that Project Magician has end of line correction option set and at the same time my git configuration under Linux didn't force the end as CRLF but Spring files had LF at the end of line! In such a situation Magician was changing line ends and debugger was stupid. And I was with him Maybe it is worth to add an exclusion path for this Magician function?
  18. Jacek Laskowski

    Unable to rename pas file to versioned ~1~ file - strange issue

    @Uwe Raabe Perhaps it would be worth adding a function to the Project Magician that will scan the project files and their paths and check if the actual paths on the disk are the same case sensitive? I know it's not very useful for most programmers, but the workload is small, and such a feature can sometimes save a lot of time. Besides, for programmers who like to keep their projects in order (and that's what Magician is for) even if everything works, it may be important to have the correct paths.
  19. Jacek Laskowski

    Unable to rename pas file to versioned ~1~ file - strange issue

    After a few hours of fighting I discovered the cause of the problems... Maybe somebody will meet with it one day and I'll give you a solution. As I wrote I migrated from Windows to Ubuntu and converted the disk from NTFS to Ext4. As you know Linux systems are case sensitive and so is Ext4. Although the files had the correct name, it turned out that in the dpr and dproj files the paths to some files sometimes had the name "\Services\" and sometimes "\services\" and that was the reason. After correcting the contents of dpr and dproj to the correct directory names, all errors disappeared.
  20. Jacek Laskowski

    Unable to rename pas file to versioned ~1~ file - strange issue

    I've worked with Shared Folders for a decade and never had such a problem, no problem at all. Only now (after migrate do Ubuntu and Ext4) the problems have come to light, but the problem is clearly in Delphi and not in file locks, because as I wrote other tools they can modify and move these files without any problem.
  21. I create an array of arrays, then assign the data in whole rows (array). Example code: program Project1; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; var lValues: array of TArray<Variant>; procedure TestAddRowData(); var lRow : TArray<Variant>; begin SetLength(lRow, 3); SetLength(lValues, 3); lRow[0] := 'one'; lRow[1] := 1; lRow[2] := '1one'; lValues[0] := lRow; lRow[0] := 'two'; lRow[1] := 2; lRow[2] := '2two'; lValues[1] := lRow; lRow[0] := 'three'; lRow[1] := 3; lRow[2] := '3three'; lValues[2] := lRow; end; begin TestAddRowData(); Writeln(lValues[0, 0]); Writeln(lValues[0, 1]); Writeln(lValues[0, 2]); Writeln(lValues[1, 0]); Writeln(lValues[1, 1]); Writeln(lValues[1, 2]); Writeln(lValues[2, 0]); Writeln(lValues[2, 1]); Writeln(lValues[2, 2]); Readln; end. Results: three 3 3three three 3 3three three 3 3three I expected to get all the data according to their addition... Isn't there a Copy on Write rule for arrays?
  22. Jacek Laskowski

    MMX 15.0.18 - font bug

    @Uwe Raabe I got it! I managed to repeat the effect a few times, I recorded the screencast: https://www.youtube.com/watch?v=PmsQHrr3muU&feature=youtu.be
  23. Jacek Laskowski

    Ctrl Tab Ide Plugin

    Extension's cool and needed. Thanks for that! After a minute of use, I see one flaw... if I have a lot of code cards open, the window with ListBox does not scroll and pressing the Tab key hides the cursor outside the window after a while.
×