-
Content Count
1937 -
Joined
-
Last visited
-
Days Won
25
Everything posted by Attila Kovacs
-
well, you have to learn foreign languages then, or look for a native forum, you see me? friend 🙂
-
application repeat db-task while not dataset.eof do begin // main loop blocked dataset.next; end; form2.showmodal -> modal form repeat Application.ProcessMessages; <- modal form workaround, bites as hell until ModalResult <> 0 Application.ProcessMessages; until terminate
-
@Dalija Prasnikar Could you explain the difference between "putting a db task into a thread" (thread) vs. "application.processmessages" regarding to the GUI?
-
@Anders Melander Ahum, there was a line missing, the forum is glitching today;)
-
I'm using this since you (pre-)released it back in the G+ era and I'm very grateful to you for creating it.
-
poor man's responsive GUI var FOldMessageEvent: TMessageEvent; FOldMessageEvent := Application.OnMessage; Application.OnMessage := MyOnMessage; try // Do your stuff here and call repetitively Application.ProcessMessages; finally Application.OnMessage := FOldMessageEvent; end; procedure TfrmXY.MyOnMessage(var Msg: TMsg; var Handled: boolean); begin if (Msg.hwnd = btnStart.Handle) and (Msg.Message = WM_MOUSELEAVE) then else if Msg.hwnd = btnAbort.Handle then // if you have an abort button else case Msg.Message of WM_PAINT, WM_TIMER: // handle messages ; else Handled := True; end; end;
-
Delphi ignores path to unit in .dpr
Attila Kovacs replied to Vandrovnik's topic in RTL and Delphi Object Pascal
Well I'm not sure on that. Edit, so I've tested it: If the unit in the dpr is not found the compiler looks for the dcu's in this order: project root library path search path (but not in the "dcu out" path) explicit and relative paths are also working for the dpr (Berlin U2) if a unit is opened in the IDE and the path in the dpr matches, you can rename/remove the unit, the project will still compile. -
Delphi ignores path to unit in .dpr
Attila Kovacs replied to Vandrovnik's topic in RTL and Delphi Object Pascal
yeah we know that, is that new? try to make it relative to the project root, but I would explicitly define it in the search path from a dedicated directory like myrtlpatches/xyz the order is project root, library path, search path, so either comes into the project dir or with relative path into the dpr. -
Delphi ignores path to unit in .dpr
Attila Kovacs replied to Vandrovnik's topic in RTL and Delphi Object Pascal
@Vandrovnik there is the global library path, then there is a search path in the project options, and there is the project root dir where the IDE looks for the files. In reversed order as I wrote them. So either copy it to your project root or into a separate dir and add it to the project search path. -
Am I the only one annoyed that these are in System.Math?
-
VCL Handling of dpi changes - poor performance
Attila Kovacs replied to Vincent Parrett's topic in VCL
@Vincent Parrett Could you check if this superfluous invalidate in Vcl.Controls has an impact on it? I forgot the details on it. if Message.Msg = WM_UPDATEUISTATE then Invalidate; // Ensure control is repainted -
@Vandrovnik Brutal. Voted too. But I don't think they touch the compiler in the near future, however, I've noticed that reports regarding to the IDE are opened in a couple of workdays at the time and also being fixed. I'm surprisingly satisfied with that.
-
_exactly_ Because if someone sees it, he could think I can do math 🙂
-
I have no idea what you are talking about. Those were MinValue and MaxValue. I'm really struggling to find any sense in any of your comments.
-
@Bill Meyer well, then get some rest 😄
-
@Bill Meyer are you using explorer? known extensions are hidden?
-
Multiple string replace - avoid calling StringReplace multiple times
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
and what sorting function would you use fot this? Replace('ABA', ['BA','XX'], ['AB','XX']); -
Multiple string replace - avoid calling StringReplace multiple times
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
This would be a brand new exotic routine with unpredictable results. -
Multiple string replace - avoid calling StringReplace multiple times
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
@A.M. Hoornweg The MultiStringReplace has to consider this, right. I did not follow the whole thread and the codes, but if it's not the case, then yes, you are right, the routine is useless. Btw. your example does not reflects this. -
Multiple string replace - avoid calling StringReplace multiple times
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
? I don't understand the question. The input has a natural order. There is nothing to decide. -
Multiple string replace - avoid calling StringReplace multiple times
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
@balabuev does this respect the order of the substrings? -
Multiple string replace - avoid calling StringReplace multiple times
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
-
Multiple string replace - avoid calling StringReplace multiple times
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
What is that? Can you omit the for-to index in 10.4 or is there a StringReplace which accepts arrays? for i := Low(aOldPatterns) to High(aOldPatterns) do Result := StringReplace(Result, aOldPatterns, aNewPatterns, [rfReplaceAll]); -
@Geoorge So you want to hide the screen from the client meanwhile you are changing some settings?
-
then you would end up like the dialog in your other thread