-
Content Count
3416 -
Joined
-
Last visited
-
Days Won
113
Everything posted by Lars Fosdal
-
FreeAndNil() - The Great Delphi Developer Debate
Lars Fosdal replied to AlexBelo's topic in Tips / Blogs / Tutorials / Videos
Just .DisposeOf's... and the reoccuring questions about why objects doesn't self-destruct (after you have intentionally or unintentionally made references that keeps it alive. -
FreeAndNil() - The Great Delphi Developer Debate
Lars Fosdal replied to AlexBelo's topic in Tips / Blogs / Tutorials / Videos
I use FreeAndNil, unless the object is handled by a try/finally block, or it is in a destructor. It speeds up finding stupid mistakes in loops or singletons. -
Do you need an ARM64 compiler for Windows?
Lars Fosdal replied to Lars Fosdal's topic in Cross-platform
It is called off-topic 😛 -
If you can programmatically add an index - i.e. without using SQL - it should work - but I've never tried it.
-
MIT researchers uncover ‘unpatchable’ flaw in Apple M1 chips
Lars Fosdal replied to PeterPanettone's topic in General Help
Ghostery shows the link on a confirmation page for me to decide on whether to continue or not. -
MIT researchers uncover ‘unpatchable’ flaw in Apple M1 chips
Lars Fosdal replied to PeterPanettone's topic in General Help
There is a tracker redirect behind that link. AdBlockers hate those. -
In https://docwiki.embarcadero.com/RADStudio/Sydney/en/Local_SQL_(FireDAC) the "Query" section seems to indicate that it does not?
-
True, it is only a problem if you pass the values around to be modified.
-
A warning: Using records instead of objects in containers carries the penalty of duplication. LabelRecord1.iValue:= 123; LabelRecord1.iColor := 234; LabelMatrix[1,1] := LabelRecord1; LabelRecord1.iColor := 567; At this point, LabekMatrix{1,1].iColor will still be 234. It is the same the other way around. Modify the array value, and the variable stays unchanged. A workaround would be to use pointers. type PLabelRecord = ^TLabelRecord; and use variables and arrays of that type. You would need to New/Dispose each reference, but at least there is no duplication as you pass around the pointer reference to the original allocation instead of copying the record like in the original example.
-
Delphi 11.1 Stuck While Opening Project
Lars Fosdal replied to stacker_liew's topic in Delphi IDE and APIs
Are there file references in the project that points to a fileshare that may or may not exist? -
2022 Stack Overflow Developer Survey
Lars Fosdal replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
Temporarily disabling the ad-blocker solved that for me. -
Do you need an ARM64 compiler for Windows?
Lars Fosdal replied to Lars Fosdal's topic in Cross-platform
EMBT are playing with their cards tightly held to their vest - which I guess is a tactic to avoid getting negative feedback for not delivering something that they put on the roadmap but didn't get time to do. I wish EMBT were more open and better at communicating their plans - but if you are a subscriber, I recommend joining in on any beta invite that you may receive. Please note, though, that those that get invited must sign NDAs - so it is like Fight Club: Rule #1 - Don't talk about Fight Club. But yeah... Public indicative roadmaps would be great. -
This site focuses on Delphi. It is more likely you get the info you need for Lazarus here: https://forum.lazarus.freepascal.org/index.php?action=forum
-
Do you need an ARM64 compiler for Windows?
Lars Fosdal replied to Lars Fosdal's topic in Cross-platform
In theory - except there is an OS layer there somewhere. -
Do you need an ARM64 compiler for Windows?
Lars Fosdal replied to Lars Fosdal's topic in Cross-platform
When MS is actually porting VS to Native ARM for Windows - there is no doubt that they are serious about ARM this time. I am running the Windows for ARM preview on my MBP 16" M1 Pro. And I am now also running VS 2022 for MacOS - which already is ARM64 🙂 -
When creating frames runtime in VCL, there are a set of tweaks that need to be applied to make the frame behave properly after creation (setting parent/owner etc). Are there similar tricks needed for FireMonkey, and are there other pitfalls related to dynamically creating frames at runtime? Is it better to drop the frames on the main form at design time?
-
Kinda hard to do proper multi-branch management from within the Delphi IDE.
- 10 replies
-
I use GitKraken outside of the IDE, following the same modus operandi as @Roger Cigol
- 10 replies
-
problem upgrading to Delphi 11.1 Patch 1
Lars Fosdal replied to Dave Novo's topic in Delphi IDE and APIs
I ran the patch from GetIt in the IDE directly. No such messages for me on my Windows 10. -
For those that do High-DPI, are we now at a point where a multi-developer team w/mixed DPI systems can work on the same project without screwing up the layout / scaling?
-
I haven't been on Facebook since 2018, and I am not going there again.
-
Another method to do JSON to Object. unit StructureTestTypes; interface uses REST.Json, System.SysUtils; type TStructure = class(TObject) // '{"RESULT":200, "IDLIST":[1,2,3,4,5]}' private FIDLIST: TArray<Integer>; FRESULT: integer; public constructor Create; virtual; destructor Destroy; override; property RESULT: integer read FRESULT write FRESULT; property IDLIST: TArray<Integer> read FIDLIST write FIDList; end; implementation { TStructure } constructor TStructure.Create; begin SetLength(FIDLIST, 0); end; destructor TStructure.Destroy; begin SetLength(FIDLIST, 0); inherited; end; end. Test Program: program JsonStructureTest; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, REST.Json, StructureTestTypes in 'StructureTestTypes.pas'; var Test: TStructure; begin Test := TJson.JsonToObject<TStructure>('{"RESULT":200, "IDLIST":[1,2,3,4,5]}']); try try Writeln('Result: ', Test.RESULT); Write('IDList:'); for var i in Test.IDLIST do Write(' ', i ); Writeln; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; finally Test.Free; Writeln; Write('Press Enter: '); Readln; end; end.
-
Survey of Delphi Versions in use??
Lars Fosdal replied to Ian Branch's topic in Community Management
It may make sense to use an external survey service and post a link to it on prominent Delphi sites. That will enable better version coverage in the survey. -
Or just buy it and support the author.
-
Reorganize a class / Set Of ..
Lars Fosdal replied to PatV's topic in Algorithms, Data Structures and Class Design
The lack of an Enumeration constraint is one of my big annoyances with Delphi Generics. No support for ord, pred, succ, or set of, in, or other set operators.