-
Content Count
3522 -
Joined
-
Last visited
-
Days Won
116
Everything posted by Lars Fosdal
-
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.
-
Non Delimited string parsing (registry entries)
Lars Fosdal replied to RTollison's topic in General Help
https://larsfosdal.blog/2019/08/06/generic-command-line-parser-for-delphi-10-3-x/ Also, this thread contains numerous other parsers. -
Generics: Classes vs Records - Differences in use
Lars Fosdal replied to Lars Fosdal's topic in Algorithms, Data Structures and Class Design
Start a new topic. Give some examples. -
Generics: Classes vs Records - Differences in use
Lars Fosdal replied to Lars Fosdal's topic in Algorithms, Data Structures and Class Design
Another benefit of using generic classes over records is the amount of reuse. -
Generics: Classes vs Records - Differences in use
Lars Fosdal replied to Lars Fosdal's topic in Algorithms, Data Structures and Class Design
True that. -
Generics: Classes vs Records - Differences in use
Lars Fosdal replied to Lars Fosdal's topic in Algorithms, Data Structures and Class Design
I agree. If we consider the current example, what would be your choice? -
Generics: Classes vs Records - Differences in use
Lars Fosdal replied to Lars Fosdal's topic in Algorithms, Data Structures and Class Design
Exactly. Which is why I use objects. -
Generics: Classes vs Records - Differences in use
Lars Fosdal replied to Lars Fosdal's topic in Algorithms, Data Structures and Class Design
TList<^TDataRec>? -
Generics: Classes vs Records - Differences in use
Lars Fosdal replied to Lars Fosdal's topic in Algorithms, Data Structures and Class Design
Which is why I don't use dictionaries with records. It is rare that I load up a dictionary and do not need to change some of the content later. If I was insistent on doing records, I would probably write code that ordered the array by the key and did binary lookup to a pointer to the record. -
Generics: Classes vs Records - Differences in use
Lars Fosdal replied to Lars Fosdal's topic in Algorithms, Data Structures and Class Design
@David Heffernan The last time I tried that, I was changing copies of what I had put into the dictionary. Perhaps I was doing it wrong? -
Should Exit be used instead of 'record Exists?' boolean?
Lars Fosdal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
How many elements in Data ? -
Issues Deploying Firebird DB on Ubuntu 8.04LTS
Lars Fosdal replied to Larry Hengen's topic in Cross-platform
@Larry Hengen - did you change the access rights (chmod) on the db file as well? What are the access rights? -
Delphi 10.4.1 code navigation - Cursor is vanished
Lars Fosdal replied to RonaldK's topic in Delphi IDE and APIs
Have you tested without extra IDE extensions? -
Delphi 10.4.1 code navigation - Cursor is vanished
Lars Fosdal replied to RonaldK's topic in Delphi IDE and APIs
Found a somewhat related case to my issue in QP: https://quality.embarcadero.com/browse/RSP-28514 Added my comments to it. -
Delphi 10.4.1 code navigation - Cursor is vanished
Lars Fosdal replied to RonaldK's topic in Delphi IDE and APIs
See comments #1 Ctrl+Shift+ArrowUp/Down does not work. Seems to be due to typed constant. See comments #2: Broken class completion, seemingly due to same cause as #1. program SydneyCodeNav; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; type TRec = record a: Integer; // procedure Test; // #2 Uncomment line and press Ctrl+Shift+C to complete code end; TMyObject = class const TR:TRec = (a:1); private procedure InternalTest; // #1 Place cursor here, try Ctrl+Shift+ArrowDown does not work public procedure Test; end; TUnrelated = class // procedure Unrelated; // #2 Uncomment line and press Ctrl+Shift+C to complete code end; { TMyObject } procedure TMyObject.InternalTest; begin Writeln('InternalTest'); // #1 Place cursor here, Ctrl+Shift+ArrowDown end; procedure TMyObject.Test; begin Writeln('Test'); // #1 Place cursor here, Ctrl+Shift+ArrowDown does not work InternalTest; // Ctrl-Clicking InternalTest works end; procedure Test; // Chtrl+Shift+ArrowUp/Down works here var o: TMyObject; begin o := TMyObject.Create; // Chtrl+Shift+ArrowUp/Down works here try o.Test; finally o.Free; end; end; begin try try Test; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; finally Write('Press Enter: '); Readln; end; end. -
Delphi 10.4.1 code navigation - Cursor is vanished
Lars Fosdal replied to RonaldK's topic in Delphi IDE and APIs
I haven't seen that specific problem, but I have some units where Ctrl+Shift+Arrow up/down simply refuses to work in 10.4.1 as well as 10.3.3. I need to try to make a minimal example and report it. -
Delphi 10.4.1 code navigation - Cursor is vanished
Lars Fosdal replied to RonaldK's topic in Delphi IDE and APIs
Is this to navigate between interface and implementation for a class method? -
Message Dialog Expert form is too small in Delphi 10.3.3 & 10.4
Lars Fosdal replied to Ian Branch's topic in GExperts
I have an AOC U3277 - very happy with it. -
You can collapse a section of the subforum list, but then there are the activity streams.
-
10.4.1 Released today
Lars Fosdal replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
My installation did the uninstall and asked if I wanted to keep the current registry settings, which I confirmed. Colors and environment variables, etc, were as expected after the new installation. Same with SDKs and Connections. I did have some issues with Parnassus - where I had to delete the old Parnassus_Sydney DLLs for the installer to run as the old ones did not work with the new IDE. Then I got some missing Parnassus warnings when loading workspace, before I could reinstall with GetIt. After installation, the DLLs were where I expected, and everything worked as expected - apart from a floating bookmark window 😛 -
It is slightly annoying that you have to manually reinstall GetIt component packages on an upgrade like this.
-
looking for UI design ideas for tracking a process
Lars Fosdal replied to David Schwartz's topic in VCL
Individual ticket display - It depends a lot on the type of user. I know that our users that are non-PC aficionados, are uncomfortable with tree views. If the series of stages are sequential, I'd consider a segmented progress bar, combined with a panel with information on the status of the current stage in progress. Just to stay in line with my original example -
Well, technically I use RAD Studio - that has the C++ bit - but that is sort of a remnant from when the .NET stuff looked like it was going somewhere. Not sure if it is possible to downgrade from RAD Studio Enterprise to Delphi Enterprise. I never use the C++ bit even though I always install it for good measure. Point being: There is a relationship that goes heavily from C++Builder to Delphi, but which is very weak the other way around.
-
[IDidNotMadeThis] Delphi-DirectUI - a new set of UI controls based on Graphics32
Lars Fosdal replied to Edwin Yip's topic in I made this
I replaced the URL. -
Indeed it is only outbound. All inbound activity is TCP/UDP oriented.