-
Content Count
3416 -
Joined
-
Last visited
-
Days Won
113
Everything posted by Lars Fosdal
-
Suggestion: Debugger inspection templates for complex types
Lars Fosdal posted a topic in Delphi IDE and APIs
I posted the following suggestion on the QP. https://quality.embarcadero.com/browse/RSP-37096 I wish I could leave hints in the code as to how I would want a debugger to visualize a complex type variable. You add specify it as a watch statement, but you can’t really keep an infinite list of watches, hence a way of describing a default inspection view in the source code would be useful. type TEditForm = class(TForm) Edit1: TEdit; //$inspect Edit1.(FEnabled, FName, FCaption, Trim(FText)) Consider the hint if you hover over Edit1 in TEditForm.Validate Imagine if the inspect hint comment after the variable declaration had effect: //$inspect Edit1.(FEnabled, FName, FCaption, Trim(FText)) All the formatting and tricks that can be done in the inspector, should be applicable in the $inspect template. You can still expand the Edit1 to see the fields, although I'd like an "All" option and a scrollable list, and perhaps a highlight for the $inspect featured fields. Likewise, for the watch - it could suggest the $inspect template by default instead of the full list, with a checkbox to include all fields if so desired. Another possibility would be to declare the $inspect template at the type declaration, having every instance of that type show the filtered field list. -
Suggestion: Debugger inspection templates for complex types
Lars Fosdal replied to Lars Fosdal's topic in Delphi IDE and APIs
Instead of the inline "magic" comment, another option would be to have the definitions in a "hive" - be it flat file, database, registry or whatever. -
Suggestion: Debugger inspection templates for complex types
Lars Fosdal replied to Lars Fosdal's topic in Delphi IDE and APIs
It is not ideal, I agree - but it is easy to introduce. If it fails, it fails - and you fix the comment, and it works. I like the .NET approach too, but it does add a bit of "ceremony" - but it definitively makes sense for frequently used complex classes. -
Suggestion: Debugger inspection templates for complex types
Lars Fosdal replied to Lars Fosdal's topic in Delphi IDE and APIs
It was just an example of basic functions that could be applied. That said, some of the ancient APIs we rely on, are fixed length strings that are space padded. The idea was that whatever you can do in the evaluator today, should be possible to apply to the inspect format string. -
Project to create a language definition in BNF format started
Lars Fosdal replied to TurboMagic's topic in RTL and Delphi Object Pascal
There is a diagram renderer here: https://www.bottlecaps.de/rr/ui - but it barfs on the first definition. -
Project to create a language definition in BNF format started
Lars Fosdal replied to TurboMagic's topic in RTL and Delphi Object Pascal
I can't find a validator that will accept the Object Pascal Grammar. -
Project to create a language definition in BNF format started
Lars Fosdal replied to TurboMagic's topic in RTL and Delphi Object Pascal
BTW - Is this file in EBNF format? -
Suggestion: Debugger inspection templates for complex types
Lars Fosdal replied to Lars Fosdal's topic in Delphi IDE and APIs
@Attila Kovacs I am not sure why you think this would be slower than the current inspection view? Massaging the data for display is not that time consuming, considering you already are in a breakpoint situation - or are you thinking about applying it for a logging breakpoint? -
Suggestion: Debugger inspection templates for complex types
Lars Fosdal replied to Lars Fosdal's topic in Delphi IDE and APIs
True, which is another reason to support something like this in the debugger. -
Problems with email confirmation
Lars Fosdal replied to AlanScottAgain's topic in Community Management
@AlanScottAgain - Can't rename as there is an existing older AlanScott account already. -
Problems with email confirmation
Lars Fosdal replied to AlanScottAgain's topic in Community Management
@Daniel - any known issues atm? -
Delphi on Windows 11 on MacBook Pro 16 (2021)
Lars Fosdal replied to Lars Fosdal's topic in Cross-platform
For the M-series ARM CPUs, Windows 11 for ARM is the only viable option. Parallells' seamless Windows on MacOS solution is mindblowing. I am working on integration solutions using IBM App Connect Enterprise these days, so I've not been able to spend so much time with Delphi on the Mac as I'd like to. Our company is moving away from Delphi, and the current app portfolio has gone into care & maintenance mode and will in time be replaced with commercial shelf-ware, so my active Delphi time will be greatly reduced going forward. As for using Delphi under Win4ARM om M1 - compilation is not a problem, but I have not had time to test debugging on iOS/Android at all, so others must peep up about any eventual issues on that. Other than the debuggers of Delphi being in an awful state in general - as long as the VM is set up to reroute the USB connections correctly, I would not expect any issues. I went for Pro + 32Gb + 2TB as I don't expect to need those gfx cores. I'd opt for a 64Gb Pro if there was one, but only Max supports 64Gb. I have to say it is an awesome piece of HW - although - during the winter, I actually miss the heat from the Intel CPU on the Lenovo 😛 I'd opt for even more storage, but Apple are greedy AF. -
Announcement: Magenta Hardware Components
Lars Fosdal replied to Angus Robertson's topic in Delphi Third-Party
Fixed that. -
We do that for configuration data - it is basically like a key/value dictionary.
-
If they react at all.
-
Does HFS support secure connections?
-
An instance is a value of a class type that has been constructed with a call to Create. A class var is shared across all instances of the class - and they are accessible directly from the uninstanced type as TCompany.ClassVarName. The drawback is that you can only have one value for all the TCompany instances. If you need to have multiple companies in memory, you need to do a TCompany.Create and load up the instances ordinary fields/props per company.
-
Just curious - since the data has to be imported - why bother with class vars instead of using a regular instance with regular fields?
-
https://filezilla-project.org/ aka "The free FTP solution" has both a client and a server. Open source, and pretty good. Configurable connections, including source and target folders. Quick, easy and reliable - and you can set a throttle for the transfer rates if you need to. Edit: One significant drawback - the client is not suitable for command line scripting. If you need to do that, you need to use WinSCP or PowerShell.
-
Using uninitialized object works on Win32, throws AV on Win64
Lars Fosdal replied to aehimself's topic in General Help
I don't mind the compiler throwing hints and warnings - as I always fix them as they appear. I even set some warnings to be errors - since they most likely are severe enough to dictate a no-tolerance policy. -
Class properties: Wins prettyness over functionality ?
Lars Fosdal replied to Rollo62's topic in Algorithms, Data Structures and Class Design
Just a minor detail, based on the wisdom in the Framework Design Guidelines book: I would call the property Enabled, and not Enable. Enabled is a state. Enable is an operator. Also - I would not use FThing - but Thing. If it is publicly accessible as a property, I'd use the prop ref, not the field ref, unless the FThing getter did lazy initialization. If it is not for public use, I'd place it under private or strict private and not use the F prefix. Avoiding prefixes also helps for readability. Thing.Enabled := True; Thing.Execute( 1 ); // or Thing.Enable; Thing.Execute( 1 ); // or - Enable could be a function to set Enabled to true, that returns true if it succeeded. if Thing.Enable then Thing.Execute( 1 ); -
Remote Delphi developer position
Lars Fosdal replied to a topic in Job Opportunities / Coder for Hire
I wonder why an account was created to post the link, and then the account requested to be deleted?- 9 replies
-
- remote job opportunity
- delphi developer
-
(and 1 more)
Tagged with:
-
Good to see you back, @Sherlock! I hope you are recovering ok.
-
Class properties: Wins prettyness over functionality ?
Lars Fosdal replied to Rollo62's topic in Algorithms, Data Structures and Class Design
Other advantages: Properties can be read-only. Since you can opt to have methods for the setter and getter of a property, you also have a place to monitor the activity of the said property - with a breakpoint that simply counts accesses, a method that logs the accesses, or an actual breakpoint Using the get method, a property can allow for lazy instance generation, so that if it is never used, the connected instance is never instantiated Using the set method - the validity of a property value can be decided on assignment, without needing that validation to be spread around on the calling code -
As I write this, my laptop runs 523 processes with 7600+ threads on a 12-kernal (6 core) i7. If all those threads were check/sleep/loop based - I'd be at 100%. Instead, most of them are idle, just waiting for something to happen.