-
Content Count
3416 -
Joined
-
Last visited
-
Days Won
113
Everything posted by Lars Fosdal
-
Help needed. Re-raising exception gives AV.
Lars Fosdal replied to a topic in RTL and Delphi Object Pascal
If you expand it with the examples that actually works - it would be sufficient for a QP, IMO. -
Help needed. Re-raising exception gives AV.
Lars Fosdal replied to a topic in RTL and Delphi Object Pascal
Interestingly, the two following changes eliminates the AV on raise. Either, change LogException to a procedure procedure LogException(const E: Exception); begin Writeln('Log + ' + E.Message); //Logging('Blah blah' + Result, 'Exceptions'); FYI end; or assign the result to a variable: on E: Exception do begin lMessage := LogException(E); // AV in Sydney, OK i Berlin // LogExceptionEx(E, lMessage); // OK raise; end; It does look like a compiler problem. Is there a QP report? -
Clearly, it is based on jokes alone.
-
tsslhttpcli TSslHttpCli Access violation at address or 404 error
Lars Fosdal replied to Estefanie's topic in ICS - Internet Component Suite
I guess injecting a deprecated statement for the old class could be an option - or is that too brutal. -
@Jim McKeeth should kick some shins to have a new roadmap produced.
-
if WinApi.Windows.IsIconic(Application.MainForm.Handle) then begin // Log something end; https://docs.microsoft.com/en-gb/windows/win32/api/winuser/nf-winuser-isiconic?redirectedfrom=MSDN
-
Blocking the Windows Screen Saver in Delphi
Lars Fosdal replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
I can't remember why not - prolly because Numlock was the first to spring to mind. Anyways, I've been using this for years now, and never experienced any adverse side effects. -
Fast Reports suddenly disappared - and reinstall fails
Lars Fosdal posted a topic in Delphi IDE and APIs
Have any of you seen something similar to this? Delphi 10.3.3 -
Fast Reports suddenly disappared - and reinstall fails
Lars Fosdal replied to Lars Fosdal's topic in Delphi IDE and APIs
Well, it sort of forced my hand in switching to 10.4.1 a little ahead of time. Going live on new version to day. Oh, such fun to reconfigure all the build scripts 😛 -
New feature request: Open dfm as Text if malformed (vote if care)
Lars Fosdal replied to Tommi Prami's topic in Delphi IDE and APIs
Sounds like an excellent suggestion! -
10.4.1 - Debug Layout with Parnassus Bookmarks raises AV
Lars Fosdal posted a topic in Delphi IDE and APIs
Much annoying. Very bug. 😛 https://quality.embarcadero.com/browse/RSP-30576 -
10.4.1 - Debug Layout with Parnassus Bookmarks raises AV
Lars Fosdal replied to Lars Fosdal's topic in Delphi IDE and APIs
Doh! Ref. https://blogs.embarcadero.com/ide-plugins-in-rad-studio-10-4-1/ The solution was to use GetIt to uninstall 1.6.1 and install 1.6.2. -
There is an extra fee for solving homework problems, isn't there?
-
Generics: Classes vs Records - Differences in use
Lars Fosdal posted a topic in Algorithms, Data Structures and Class Design
Thread split off from if Data.TryGetValue(aId, vNewData) then vNewData.DataName := aName; else begin vNewData := TDataRec.Create; vNewData.DataId := aId; vNewData.DataName := aName; Data.Add(aId, vNewData); end; @Stefan Glienke - What is the best container for random lookup access for records? -
Best Practices for FireDAC FetchMode/RecordCount Settings
Lars Fosdal replied to Larry Hengen's topic in Databases
Indexing and doing index maintenance is crucial to maintain performance. If the queries can be done completely free form, that will be a challenge. IMO, there are few settings to FireDAC that really affects the performance once the query has been passed to the server. -
Generics: Classes vs Records - Differences in use
Lars Fosdal replied to Lars Fosdal's topic in Algorithms, Data Structures and Class Design
In my experience, it is far easier to use classes when you need to modify contents. I wish it weren't so, and it can be worked around - but then usually with pointer references, and at that point (pun intended), I might as well be doing objects and maintain type safety and support polymorphism. -
Generics: Classes vs Records - Differences in use
Lars Fosdal replied to Lars Fosdal's topic in Algorithms, Data Structures and Class Design
Can you offer an example? -
Generics: Classes vs Records - Differences in use
Lars Fosdal replied to Lars Fosdal's topic in Algorithms, Data Structures and Class Design
I am trying to improve my tendency to spin off a discussion in a thread focused on something else, so here we are. To reiterate, my preference for classes over records with regards to generics, is that read-only generics for records works perfectly for its use, but when you need to update the content in the record, it becomes a very different exercise. You either need to have structure specific methods to change the record field values, or you must copy the entire record, modify it, and the copy it back. The first option wreaks havoc on reuse, and the second option can become a performance bottleneck if the record is large. Even more so, if the record is multidimensional, containing records with arrays of records. The same kind of change in a multidimensional class, is trivial in comparison. @David Heffernan - hence my "the amount of reuse" argument. -
Should Exit be used instead of 'record Exists?' boolean?
Lars Fosdal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Moved my digressions to -
Generics: Classes vs Records - Differences in use
Lars Fosdal replied to Lars Fosdal's topic in Algorithms, Data Structures and Class Design
"the amount of reuse" was my point. -
Generics: Classes vs Records - Differences in use
Lars Fosdal replied to Lars Fosdal's topic in Algorithms, Data Structures and Class Design
We also know that the two need to be handled differently when it comes to changing their contents. -
I splitted this thread off this
-
What is wrong with TStringList
Lars Fosdal replied to pyscripter's topic in RTL and Delphi Object Pascal
Splitted off the Interposer discussion. -
If I did the my own component approach - I would need multiple versions of the design time components to deal with the different methods of feeding data to the controls, and every time I upgraded TMS, or made a change to the wrapper, I would have to rebuild them. Since the wrapper code is continuously evolving - switching between Live, Pilot and Trunk would be very cumbersome if I had to swap the components used as well. Since the data side of the wrapper is not linked to visual code and the events are connected to the wrapper and not the component, it is easy to write non-visual test code that can simulate UI events. Custom components are an option, but. I personally prefer the wrapper approach.
-
We use interposers or wrapper classes to populate third party components such as the grid, list and combo controls from TMS. It started with us having hundreds of grids, and to get a normalized look, it was better to use a wrapper class to set them up, than to manually configure each class in each form. This class eventually evolved into several wrappers, most of them being data-aware so that we had unified ways of populating a grid, list or combo - straight from SQL, from object lists, or direct fill from "hard code", as well as handling selection events, etc. Another benefit is that if TMS should happen to make changes or add features - we only need to deal with it in the wrappers.