-
Content Count
94 -
Joined
-
Last visited
Everything posted by uligerhardt
-
Hi all! I have some kind of dashboard/action central that provides a host of different buttons. All of these start an independent task and display progress info about that task (in a tree view). Currently this is handled without threading, so the dashboard is blocked until the task is finished. Therefore I'd like to make these tasks into threads. What threading library would you recommend? TThread, Andreas Hausladen's AsyncCalls, OmniThread or something different?
-
Simole threads providing progress info
uligerhardt replied to uligerhardt's topic in RTL and Delphi Object Pascal
I did some threading experiments with TThread but in a more complicated situation and dropped that - I would have had to accept user input in dialogs during the thread. For my current needs handing a anonymous procedure to the thread should suffice, I think. So I'll try TThread again. Thank you all for answering to my not very well prepared question. -
Simole threads providing progress info
uligerhardt replied to uligerhardt's topic in RTL and Delphi Object Pascal
XE6 in the meantime (don't ask ) But still no System.Threading AFAICS. -
Constant declarations keeps baffling me (don't know enough I guess)
uligerhardt replied to Tommi Prami's topic in RTL and Delphi Object Pascal
My fragment wouldn't have compiled. And as stated I'm not sure if it helps with this: That might depend on the scenario. IIRC this syntax is used in the RTL/VCL code - can't check right now. -
Constant declarations keeps baffling me (don't know enough I guess)
uligerhardt replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Hmm, my code got garbled somehow. Thanks for the correction. -
Constant declarations keeps baffling me (don't know enough I guess)
uligerhardt replied to Tommi Prami's topic in RTL and Delphi Object Pascal
You can use cast syntax - not sure how much that helps: const OTHER_FLOAT_CONSTANT Double0.005); -
Constant declarations keeps baffling me (don't know enough I guess)
uligerhardt replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Only untyped constants are "real" constants. Typed constants are more like variables you can't change. That's just how Delphi works. -
I'd like to sort the units used in our projects (*.dpr/*.dpk) by dependency. (I hope for faster compilations.) Are there tools to do that? PAL from Peganza outputs an "Optimal uses list" but that is rather "untidy" - e.g. third party units, my base units and the "business logic" all mixed together.
-
Tool to sort units used in project by dependency
uligerhardt replied to uligerhardt's topic in Delphi IDE and APIs
This would only apply if we're rearranging the used units inside a pas file. My question is about the project file, where you typically don't have much code. -
Tool to sort units used in project by dependency
uligerhardt replied to uligerhardt's topic in Delphi IDE and APIs
Probably you both are right and I'm asking too much. FWIW: I don't want the units in the order they are first needed, just - as far as possible - dependent units after the units they use. If i find time I'll try to go with PAL's list and check if it makes a difference in compile time. -
Tool to sort units used in project by dependency
uligerhardt replied to uligerhardt's topic in Delphi IDE and APIs
These are not mutually exclusive. E.g. PAL gives something like BusinessLogicA ThirdPartyA MyBaseStuffA BusinessLogicB ThirdPartyB MyBaseStuffB which satisfies the first bullet. I'd like to have ThirdPartyA ThirdPartyB MyBaseStuffA MyBaseStuffB BusinessLogicA BusinessLogicB which satifies both criteria. I guess this would be some kind of stable sorting based on the original uses order. -
How to make "dynamic initialization" procedure
uligerhardt replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Seems like an array should be the way: type TMyFields = array[1..4] of TField; procedure TForm1.FormCreate(Sender: TObject); var LFields: TMyFields; i: Integer; begin for i := Low(TMyFields) to High(TMyFields) do LFields[i] := Query.FieldByName('FIELD' + IntToStr(i)); end; -
TForm Destroys are not called when target is macOS ARM 64-bit
uligerhardt replied to Navid Madani's topic in Cross-platform
Is this the cross-platform development I keep reading about? 😎 -
Surprising behavior of .ToUpper
uligerhardt replied to Hans♫'s topic in RTL and Delphi Object Pascal
Turkish has two kinds of I - one with dot and one without. Their case-handling is special. See Dotless I - Wikipedia. -
For me editting $DEFINEs and $IFDEFs sometimes breaks syntax highlighting - everything after the directive is colored like a preprocessor directive. (But I'm still on XE6)
-
If you don't want to change the order of parameters you can use two overloaded functions like this: interface function GetWeekDates(const GivenDate: TDateTime; const SOWDay: string; out startDate, endDate: TDateTime): Boolean; overload; function GetWeekDates(const GivenDate: TDateTime; out startDate, endDate: TDateTime): Boolean; overload; implementation function GetWeekDates(const GivenDate: TDateTime; const SOWDay: string; out startDate, endDate: TDateTime): Boolean; begin //... end; function GetWeekDates(const GivenDate: TDateTime; out startDate, endDate: TDateTime): Boolean; begin Result := GetWeekDates(GivenDate, 'SU', startDate, endDate); end; Alternatively, drop the overload and use different names like GetWeekDates and GetWeekDatesEx.
-
In our app we have some DXF related units whose names start with "Dx" or "DX". We also use DevEx and they have lower case "dx". So I'd like to have dx* case-sensitively grouped as third-party but left D* alone. Is there an option to make UsesCleaner do that?
-
UsesCleaner: Consider case for grouping?
uligerhardt replied to uligerhardt's topic in MMX Code Explorer
I see - thanks for the info, Uwe. And for all the useful tools. 🙂 -
Hi all, I recently started using UsesCleaner and mostly love it. One mildly annoying aspect is that it removes comments after units in the uses clause. I often have clauses like uses Unit1, // PALOFF - to suppress false positives from Pascal Analyzer Unit2, // used because of some obscure reason Unit3; // TODO remove when ... and have to reinstate all the comments after using UsesCleaner. Is there a way to make UsesCleaner leave the comments in place?
-
UsesCleaner: Retain comments in uses clause?
uligerhardt replied to uligerhardt's topic in MMX Code Explorer
Thanks for the info, Uwe - I already suspected this. Fortunately, it's not a big problem. -
Testers needed for GExperts Instant Grep expert
uligerhardt replied to dummzeuch's topic in GExperts
Next nitpick: If the Instant Grep window is focussed, pressing Shift-Alt-S brings up the Grep submenu. If I dismiss it (by clicking somewhere else) the expected Grep dialog shows. -
Testers needed for GExperts Instant Grep expert
uligerhardt replied to dummzeuch's topic in GExperts
MInor issue: Clicking the "Case sensitive" checkbox doesn't update the search. -
Works now for me. I loaded our historically grown monster project and it was parsed quickly and without obvious errors. 😉
-
After downloading the "official" version again, loading a DPR worked; creating the graph still doesn't - see PM.
-
Still can't load a project: I have XE6 and 10.4 installed.