-
Content Count
267 -
Joined
-
Last visited
-
Days Won
2
Posts posted by Jacek Laskowski
-
-
What exactly are PoolCleanupTimeout and PoolExpireTimeout in FireDAC connection definition params?
Documentation not explain these parameters.
-
21 hours ago, Dmitry Arefiev said:Yes, it is. But you can use always full object (table) name.
@Dmitry Arefiev Dmitry, please explain what you mean?
-
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?)
-
I don't know the answer to the question, but it may be useful:
- 3
- 1
-
-
Look at my idea, without records, but with interfaces, SQL is generated automatically, moreover UPDATE and INSERT works 😉
- 1
-
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?
-
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>
-
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.
-
52 minutes ago, Uwe Raabe said:I think that would be too much of a hassle, especially when you are working with relative paths and/or want to configure that on a per project/-group level. One could even throw wildcards in there to complicate things further.
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.
52 minutes ago, Uwe Raabe said:You can either switch off that feature or make the offending files read-only.
BTW, I also get these LF problems with Spring4D all over the place, but I usually don't debug it. Interestingly, up to now it seems to be the only library with this hickup.
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.
-
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?
-
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. -
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.
-
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.
-
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?
-
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?
-
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
- 1
-
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. -
I know, but I can't reproduce.
When something like that happens to me, I'm undo the change and repeating the edit, but the second time is okay.I'm really trying to understand that and... for now I'm too stupid 🙂
-
MMX from several versions already works really well, does not slow down, does not suspend the IDE, works quite smoothly. Thanks!
I have only one more problem with it. Unfortunately I can't find the rule, although I've been looking for a month.
Sometimes, very rarely, after editing a method in a class by ctrl+E and after approving the editing window by enter, MMX flips the header of the edited method from the public section just below the name of the class, as shown in the picture below. This problem is from about 3 versions back. -
6 hours ago, Uwe Raabe said:Version 15.0.20 should fix this issue.
Now is ok, MMX works, thanks!
Just a small remark, the labels do not fit in the frame 😉
-
I'm updating the MMX, setting the cursor on the method, press ctrl+E and...
The same thing happens when I try to enter the MMX options (menu MMX -> Properties...)
I've traced that MMX looks for FontName and FontSize in the registry, in the IDE settings in the Theme subnode, if there are no FontName and FontSize, this is an exception. I don't have these settings.
I've written it down and it works, but... something is wrong.
Delphi 10.3
-
I know. I'm not taking away your right to rest 😉
I asked here to get help from other S4D users, there are more people here.
Thanks!
-
I have type:
ISQLConfig = IDictionary<TSQLConfigIdentifier, IDBSQLRun>;
How to register this type in Spring IoC container?
Problems changing database with pooled connection
in Databases
Posted
Try debugging the difference in the firedac code, just before the error, how the manager's state differs?